{"action":"created","issue":{"url":"https://api.github.com/repos/paulpflug/script-runner/issues/1","repository_url":"https://api.github.com/repos/paulpflug/script-runner","labels_url":"https://api.github.com/repos/paulpflug/script-runner/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/paulpflug/script-runner/issues/1/comments","events_url":"https://api.github.com/repos/paulpflug/script-runner/issues/1/events","html_url":"https://github.com/paulpflug/script-runner/issues/1","id":160261145,"number":1,"title":"ESRCH error when killing parallel processes","user":{"login":"RyanZim","id":17342435,"avatar_url":"https://avatars.githubusercontent.com/u/17342435?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanZim","html_url":"https://github.com/RyanZim","followers_url":"https://api.github.com/users/RyanZim/followers","following_url":"https://api.github.com/users/RyanZim/following{/other_user}","gists_url":"https://api.github.com/users/RyanZim/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanZim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanZim/subscriptions","organizations_url":"https://api.github.com/users/RyanZim/orgs","repos_url":"https://api.github.com/users/RyanZim/repos","events_url":"https://api.github.com/users/RyanZim/events{/privacy}","received_events_url":"https://api.github.com/users/RyanZim/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-14T19:14:31Z","updated_at":"2016-06-14T23:21:34Z","closed_at":"2016-06-14T23:20:52Z","body":"I have noticed this issue various places. When I `run-npm -p` and kill the process with `^C`, it throws an ESRCH error.\r\n\r\nThis happens with different scripts, but one example is running [`imagemin-cli`](https://github.com/imagemin/imagemin-cli). I created a test case gist at https://gist.github.com/RyanZim/34bc12ef8cbd99cb6fd366d498701c14. To reproduce, run `npm test`. The script will `echo` \"Press ^C\". When it does, press `^C` and it should throw the error. Here is my terminal output for Lubuntu Trusty with bash:\r\n```\r\n$ npm test\r\n\r\n> t-sr@1.0.0 test /home/ryan/t-sr\r\n> run-npm -p 'imagemin' 'instruct'\r\n\r\nPress ^C\r\n^C\r\n$ internal/process.js:158\r\n      throw errnoException(err, 'kill');\r\n      ^\r\n\r\nError: kill ESRCH\r\n    at exports._errnoException (util.js:949:11)\r\n    at process.kill (internal/process.js:158:13)\r\n    at ChildProcess.child.close (/home/ryan/t-sr/node_modules/better-spawn/index.js:51:24)\r\n    at Object.closeAll [as close] (/home/ryan/t-sr/node_modules/script-runner/lib/index.js:61:22)\r\n    at process.<anonymous> (/home/ryan/t-sr/node_modules/script-runner/lib/index.js:145:62)\r\n    at emitNone (events.js:86:13)\r\n    at process.emit (events.js:185:7)\r\n    at Signal.wrap.onsignal (internal/process.js:186:44)\r\n^C\r\n$\r\n```\r\nHope you can get this untangled. Thanks for the great tool!"},"comment":{"url":"https://api.github.com/repos/paulpflug/script-runner/issues/comments/226045570","html_url":"https://github.com/paulpflug/script-runner/issues/1#issuecomment-226045570","issue_url":"https://api.github.com/repos/paulpflug/script-runner/issues/1","id":226045570,"user":{"login":"paulpflug","id":1881921,"avatar_url":"https://avatars.githubusercontent.com/u/1881921?v=3","gravatar_id":"","url":"https://api.github.com/users/paulpflug","html_url":"https://github.com/paulpflug","followers_url":"https://api.github.com/users/paulpflug/followers","following_url":"https://api.github.com/users/paulpflug/following{/other_user}","gists_url":"https://api.github.com/users/paulpflug/gists{/gist_id}","starred_url":"https://api.github.com/users/paulpflug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulpflug/subscriptions","organizations_url":"https://api.github.com/users/paulpflug/orgs","repos_url":"https://api.github.com/users/paulpflug/repos","events_url":"https://api.github.com/users/paulpflug/events{/privacy}","received_events_url":"https://api.github.com/users/paulpflug/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T23:21:34Z","updated_at":"2016-06-14T23:21:34Z","body":"thanks for reporting :+1: "}}
{"actor":{"display_login":"paulpflug"}}