{"action":"created","issue":{"url":"https://api.github.com/repos/bobthecow/psysh/issues/163","labels_url":"https://api.github.com/repos/bobthecow/psysh/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/bobthecow/psysh/issues/163/comments","events_url":"https://api.github.com/repos/bobthecow/psysh/issues/163/events","html_url":"https://github.com/bobthecow/psysh/pull/163","id":58710188,"number":163,"title":"Cancelable forking loop","user":{"login":"Markcial","id":208523,"avatar_url":"https://avatars.githubusercontent.com/u/208523?v=3","gravatar_id":"","url":"https://api.github.com/users/Markcial","html_url":"https://github.com/Markcial","followers_url":"https://api.github.com/users/Markcial/followers","following_url":"https://api.github.com/users/Markcial/following{/other_user}","gists_url":"https://api.github.com/users/Markcial/gists{/gist_id}","starred_url":"https://api.github.com/users/Markcial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Markcial/subscriptions","organizations_url":"https://api.github.com/users/Markcial/orgs","repos_url":"https://api.github.com/users/Markcial/repos","events_url":"https://api.github.com/users/Markcial/events{/privacy}","received_events_url":"https://api.github.com/users/Markcial/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-02-24T08:59:31Z","updated_at":"2015-03-30T07:47:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bobthecow/psysh/pulls/163","html_url":"https://github.com/bobthecow/psysh/pull/163","diff_url":"https://github.com/bobthecow/psysh/pull/163.diff","patch_url":"https://github.com/bobthecow/psysh/pull/163.patch"},"body":"cancellable forking loop\r\n\r\nSee #154"},"comment":{"url":"https://api.github.com/repos/bobthecow/psysh/issues/comments/87582148","html_url":"https://github.com/bobthecow/psysh/pull/163#issuecomment-87582148","issue_url":"https://api.github.com/repos/bobthecow/psysh/issues/163","id":87582148,"user":{"login":"bobthecow","id":53660,"avatar_url":"https://avatars.githubusercontent.com/u/53660?v=3","gravatar_id":"","url":"https://api.github.com/users/bobthecow","html_url":"https://github.com/bobthecow","followers_url":"https://api.github.com/users/bobthecow/followers","following_url":"https://api.github.com/users/bobthecow/following{/other_user}","gists_url":"https://api.github.com/users/bobthecow/gists{/gist_id}","starred_url":"https://api.github.com/users/bobthecow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobthecow/subscriptions","organizations_url":"https://api.github.com/users/bobthecow/orgs","repos_url":"https://api.github.com/users/bobthecow/repos","events_url":"https://api.github.com/users/bobthecow/events{/privacy}","received_events_url":"https://api.github.com/users/bobthecow/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T07:47:37Z","updated_at":"2015-03-30T07:47:37Z","body":"Oh, I just thought of a really simple \"cancelable loop\" … I'm not sure if it's the best way to do it, but it'd probably work: use the normal pcntl-based forking loop, and register a signal handler that listens for ctrl+c and sends the current child fork a sigkill. The parent would \"recover\", effectively canceling the current operation. Thoughts on that?"}}