{"action":"created","issue":{"url":"https://api.github.com/repos/mdlawson/piping/issues/8","labels_url":"https://api.github.com/repos/mdlawson/piping/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/mdlawson/piping/issues/8/comments","events_url":"https://api.github.com/repos/mdlawson/piping/issues/8/events","html_url":"https://github.com/mdlawson/piping/pull/8","id":105083779,"number":8,"title":"Add option to respawn on exit","user":{"login":"mntnoe","id":705340,"avatar_url":"https://avatars.githubusercontent.com/u/705340?v=3","gravatar_id":"","url":"https://api.github.com/users/mntnoe","html_url":"https://github.com/mntnoe","followers_url":"https://api.github.com/users/mntnoe/followers","following_url":"https://api.github.com/users/mntnoe/following{/other_user}","gists_url":"https://api.github.com/users/mntnoe/gists{/gist_id}","starred_url":"https://api.github.com/users/mntnoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mntnoe/subscriptions","organizations_url":"https://api.github.com/users/mntnoe/orgs","repos_url":"https://api.github.com/users/mntnoe/repos","events_url":"https://api.github.com/users/mntnoe/events{/privacy}","received_events_url":"https://api.github.com/users/mntnoe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-09-06T10:18:58Z","updated_at":"2015-09-24T10:24:05Z","closed_at":"2015-09-24T10:21:03Z","pull_request":{"url":"https://api.github.com/repos/mdlawson/piping/pulls/8","html_url":"https://github.com/mdlawson/piping/pull/8","diff_url":"https://github.com/mdlawson/piping/pull/8.diff","patch_url":"https://github.com/mdlawson/piping/pull/8.patch"},"body":"This PR adds the option respawnOnExit, defaulting to true, which is the current behavior. Setting the option to false will only respawn the application after a file change.\r\n\r\nThe PR also includes some other fixes:\r\n- On some systems, when not using polling, only a single change event is emitted per file. The linked issue has a workaround which has been implemented here for now.\r\n- `worker.kill()` (previously `worker.destroy()`) does not fire SIGTERM event handlers for some reason. Use the old school way of sending this event. This is necessary to get for instance `hapi` to shut down correctly.\r\n- After allowing respawning only on file change, the approach of storing a reference to the current worker became prone to race conditions. Instead, loop over all workers (which should still be one), to prevent multiple running copies.\r\n\r\nFeel free to edit or cherry-pick to your likings."},"comment":{"url":"https://api.github.com/repos/mdlawson/piping/issues/comments/142883890","html_url":"https://github.com/mdlawson/piping/pull/8#issuecomment-142883890","issue_url":"https://api.github.com/repos/mdlawson/piping/issues/8","id":142883890,"user":{"login":"mdlawson","id":1243016,"avatar_url":"https://avatars.githubusercontent.com/u/1243016?v=3","gravatar_id":"","url":"https://api.github.com/users/mdlawson","html_url":"https://github.com/mdlawson","followers_url":"https://api.github.com/users/mdlawson/followers","following_url":"https://api.github.com/users/mdlawson/following{/other_user}","gists_url":"https://api.github.com/users/mdlawson/gists{/gist_id}","starred_url":"https://api.github.com/users/mdlawson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdlawson/subscriptions","organizations_url":"https://api.github.com/users/mdlawson/orgs","repos_url":"https://api.github.com/users/mdlawson/repos","events_url":"https://api.github.com/users/mdlawson/events{/privacy}","received_events_url":"https://api.github.com/users/mdlawson/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T10:24:05Z","updated_at":"2015-09-24T10:24:05Z","body":"Merged into `0.3.0`, also bumped chokidar which bumped fsevents, which may effect OSX. @steida can you test?"}}