{"action":"closed","number":7,"pull_request":{"url":"https://api.github.com/repos/jline/jline3/pulls/7","id":77662752,"html_url":"https://github.com/jline/jline3/pull/7","diff_url":"https://github.com/jline/jline3/pull/7.diff","patch_url":"https://github.com/jline/jline3/pull/7.patch","issue_url":"https://api.github.com/repos/jline/jline3/issues/7","number":7,"state":"closed","locked":false,"title":"fix signal handling problems","user":{"login":"PerBothner","id":10293361,"avatar_url":"https://avatars.githubusercontent.com/u/10293361?v=3","gravatar_id":"","url":"https://api.github.com/users/PerBothner","html_url":"https://github.com/PerBothner","followers_url":"https://api.github.com/users/PerBothner/followers","following_url":"https://api.github.com/users/PerBothner/following{/other_user}","gists_url":"https://api.github.com/users/PerBothner/gists{/gist_id}","starred_url":"https://api.github.com/users/PerBothner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PerBothner/subscriptions","organizations_url":"https://api.github.com/users/PerBothner/orgs","repos_url":"https://api.github.com/users/PerBothner/repos","events_url":"https://api.github.com/users/PerBothner/events{/privacy}","received_events_url":"https://api.github.com/users/PerBothner/received_events","type":"User","site_admin":false},"body":"When `nativeSignals` is true (and it is always true) the `PosixSysTerminal` constructor saves the original signal handlers so we can restore them on close.  But as a side-effect, the code changed the existing signal handlers.  These handlers call `AbstractTerminal#raise`, which calls the handler from the `handlers` mapping - which has been changed to `SIG_DFL`.  So we call `handleDefaultSignal`, which does nothing.\r\n \r\nSpecifically, this means ctrl/C does nothing, so you can't use it to stop an infinite loop.  I feel if the programmer wants to trap `INT` (outside of `LineReader#parse`), they should do so explicitly.\r\n    \r\nSo I changed the code to restore the previous signal handler after we stash it away.\r\n\r\nI then noticed that the return value of `register`/`registerDefault`/`registerIgnore` is always null, which means `unregister` is a no-op.  So I fixed that to, in a separate commit.","created_at":"2016-07-15T19:03:15Z","updated_at":"2016-09-05T09:23:25Z","closed_at":"2016-09-05T09:23:25Z","merged_at":"2016-09-05T09:23:25Z","merge_commit_sha":"0095696803a75e8598353b78995f79450606ad42","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jline/jline3/pulls/7/commits","review_comments_url":"https://api.github.com/repos/jline/jline3/pulls/7/comments","review_comment_url":"https://api.github.com/repos/jline/jline3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jline/jline3/issues/7/comments","statuses_url":"https://api.github.com/repos/jline/jline3/statuses/27c7827c47a6863180436bb12e57a9d4b52e6084","head":{"label":"PerBothner:native-signals","ref":"native-signals","sha":"27c7827c47a6863180436bb12e57a9d4b52e6084","user":{"login":"PerBothner","id":10293361,"avatar_url":"https://avatars.githubusercontent.com/u/10293361?v=3","gravatar_id":"","url":"https://api.github.com/users/PerBothner","html_url":"https://github.com/PerBothner","followers_url":"https://api.github.com/users/PerBothner/followers","following_url":"https://api.github.com/users/PerBothner/following{/other_user}","gists_url":"https://api.github.com/users/PerBothner/gists{/gist_id}","starred_url":"https://api.github.com/users/PerBothner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PerBothner/subscriptions","organizations_url":"https://api.github.com/users/PerBothner/orgs","repos_url":"https://api.github.com/users/PerBothner/repos","events_url":"https://api.github.com/users/PerBothner/events{/privacy}","received_events_url":"https://api.github.com/users/PerBothner/received_events","type":"User","site_admin":false},"repo":{"id":60462065,"name":"jline3","full_name":"PerBothner/jline3","owner":{"login":"PerBothner","id":10293361,"avatar_url":"https://avatars.githubusercontent.com/u/10293361?v=3","gravatar_id":"","url":"https://api.github.com/users/PerBothner","html_url":"https://github.com/PerBothner","followers_url":"https://api.github.com/users/PerBothner/followers","following_url":"https://api.github.com/users/PerBothner/following{/other_user}","gists_url":"https://api.github.com/users/PerBothner/gists{/gist_id}","starred_url":"https://api.github.com/users/PerBothner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PerBothner/subscriptions","organizations_url":"https://api.github.com/users/PerBothner/orgs","repos_url":"https://api.github.com/users/PerBothner/repos","events_url":"https://api.github.com/users/PerBothner/events{/privacy}","received_events_url":"https://api.github.com/users/PerBothner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PerBothner/jline3","description":"","fork":true,"url":"https://api.github.com/repos/PerBothner/jline3","forks_url":"https://api.github.com/repos/PerBothner/jline3/forks","keys_url":"https://api.github.com/repos/PerBothner/jline3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PerBothner/jline3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PerBothner/jline3/teams","hooks_url":"https://api.github.com/repos/PerBothner/jline3/hooks","issue_events_url":"https://api.github.com/repos/PerBothner/jline3/issues/events{/number}","events_url":"https://api.github.com/repos/PerBothner/jline3/events","assignees_url":"https://api.github.com/repos/PerBothner/jline3/assignees{/user}","branches_url":"https://api.github.com/repos/PerBothner/jline3/branches{/branch}","tags_url":"https://api.github.com/repos/PerBothner/jline3/tags","blobs_url":"https://api.github.com/repos/PerBothner/jline3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PerBothner/jline3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PerBothner/jline3/git/refs{/sha}","trees_url":"https://api.github.com/repos/PerBothner/jline3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PerBothner/jline3/statuses/{sha}","languages_url":"https://api.github.com/repos/PerBothner/jline3/languages","stargazers_url":"https://api.github.com/repos/PerBothner/jline3/stargazers","contributors_url":"https://api.github.com/repos/PerBothner/jline3/contributors","subscribers_url":"https://api.github.com/repos/PerBothner/jline3/subscribers","subscription_url":"https://api.github.com/repos/PerBothner/jline3/subscription","commits_url":"https://api.github.com/repos/PerBothner/jline3/commits{/sha}","git_commits_url":"https://api.github.com/repos/PerBothner/jline3/git/commits{/sha}","comments_url":"https://api.github.com/repos/PerBothner/jline3/comments{/number}","issue_comment_url":"https://api.github.com/repos/PerBothner/jline3/issues/comments{/number}","contents_url":"https://api.github.com/repos/PerBothner/jline3/contents/{+path}","compare_url":"https://api.github.com/repos/PerBothner/jline3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PerBothner/jline3/merges","archive_url":"https://api.github.com/repos/PerBothner/jline3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PerBothner/jline3/downloads","issues_url":"https://api.github.com/repos/PerBothner/jline3/issues{/number}","pulls_url":"https://api.github.com/repos/PerBothner/jline3/pulls{/number}","milestones_url":"https://api.github.com/repos/PerBothner/jline3/milestones{/number}","notifications_url":"https://api.github.com/repos/PerBothner/jline3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PerBothner/jline3/labels{/name}","releases_url":"https://api.github.com/repos/PerBothner/jline3/releases{/id}","deployments_url":"https://api.github.com/repos/PerBothner/jline3/deployments","created_at":"2016-06-05T13:42:59Z","updated_at":"2016-06-05T13:43:01Z","pushed_at":"2016-07-25T18:39:09Z","git_url":"git://github.com/PerBothner/jline3.git","ssh_url":"git@github.com:PerBothner/jline3.git","clone_url":"https://github.com/PerBothner/jline3.git","svn_url":"https://github.com/PerBothner/jline3","homepage":null,"size":1623,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jline:master","ref":"master","sha":"e61ebc09804d2530c98486ede695c2e753da7369","user":{"login":"jline","id":711075,"avatar_url":"https://avatars.githubusercontent.com/u/711075?v=3","gravatar_id":"","url":"https://api.github.com/users/jline","html_url":"https://github.com/jline","followers_url":"https://api.github.com/users/jline/followers","following_url":"https://api.github.com/users/jline/following{/other_user}","gists_url":"https://api.github.com/users/jline/gists{/gist_id}","starred_url":"https://api.github.com/users/jline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jline/subscriptions","organizations_url":"https://api.github.com/users/jline/orgs","repos_url":"https://api.github.com/users/jline/repos","events_url":"https://api.github.com/users/jline/events{/privacy}","received_events_url":"https://api.github.com/users/jline/received_events","type":"Organization","site_admin":false},"repo":{"id":60111626,"name":"jline3","full_name":"jline/jline3","owner":{"login":"jline","id":711075,"avatar_url":"https://avatars.githubusercontent.com/u/711075?v=3","gravatar_id":"","url":"https://api.github.com/users/jline","html_url":"https://github.com/jline","followers_url":"https://api.github.com/users/jline/followers","following_url":"https://api.github.com/users/jline/following{/other_user}","gists_url":"https://api.github.com/users/jline/gists{/gist_id}","starred_url":"https://api.github.com/users/jline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jline/subscriptions","organizations_url":"https://api.github.com/users/jline/orgs","repos_url":"https://api.github.com/users/jline/repos","events_url":"https://api.github.com/users/jline/events{/privacy}","received_events_url":"https://api.github.com/users/jline/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jline/jline3","description":"","fork":false,"url":"https://api.github.com/repos/jline/jline3","forks_url":"https://api.github.com/repos/jline/jline3/forks","keys_url":"https://api.github.com/repos/jline/jline3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jline/jline3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jline/jline3/teams","hooks_url":"https://api.github.com/repos/jline/jline3/hooks","issue_events_url":"https://api.github.com/repos/jline/jline3/issues/events{/number}","events_url":"https://api.github.com/repos/jline/jline3/events","assignees_url":"https://api.github.com/repos/jline/jline3/assignees{/user}","branches_url":"https://api.github.com/repos/jline/jline3/branches{/branch}","tags_url":"https://api.github.com/repos/jline/jline3/tags","blobs_url":"https://api.github.com/repos/jline/jline3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jline/jline3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jline/jline3/git/refs{/sha}","trees_url":"https://api.github.com/repos/jline/jline3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jline/jline3/statuses/{sha}","languages_url":"https://api.github.com/repos/jline/jline3/languages","stargazers_url":"https://api.github.com/repos/jline/jline3/stargazers","contributors_url":"https://api.github.com/repos/jline/jline3/contributors","subscribers_url":"https://api.github.com/repos/jline/jline3/subscribers","subscription_url":"https://api.github.com/repos/jline/jline3/subscription","commits_url":"https://api.github.com/repos/jline/jline3/commits{/sha}","git_commits_url":"https://api.github.com/repos/jline/jline3/git/commits{/sha}","comments_url":"https://api.github.com/repos/jline/jline3/comments{/number}","issue_comment_url":"https://api.github.com/repos/jline/jline3/issues/comments{/number}","contents_url":"https://api.github.com/repos/jline/jline3/contents/{+path}","compare_url":"https://api.github.com/repos/jline/jline3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jline/jline3/merges","archive_url":"https://api.github.com/repos/jline/jline3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jline/jline3/downloads","issues_url":"https://api.github.com/repos/jline/jline3/issues{/number}","pulls_url":"https://api.github.com/repos/jline/jline3/pulls{/number}","milestones_url":"https://api.github.com/repos/jline/jline3/milestones{/number}","notifications_url":"https://api.github.com/repos/jline/jline3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jline/jline3/labels{/name}","releases_url":"https://api.github.com/repos/jline/jline3/releases{/id}","deployments_url":"https://api.github.com/repos/jline/jline3/deployments","created_at":"2016-05-31T18:00:01Z","updated_at":"2016-08-25T02:13:33Z","pushed_at":"2016-09-05T09:23:25Z","git_url":"git://github.com/jline/jline3.git","ssh_url":"git@github.com:jline/jline3.git","clone_url":"https://github.com/jline/jline3.git","svn_url":"https://github.com/jline/jline3","homepage":null,"size":1618,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":5,"forks":5,"open_issues":5,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jline/jline3/pulls/7"},"html":{"href":"https://github.com/jline/jline3/pull/7"},"issue":{"href":"https://api.github.com/repos/jline/jline3/issues/7"},"comments":{"href":"https://api.github.com/repos/jline/jline3/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/jline/jline3/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/jline/jline3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jline/jline3/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/jline/jline3/statuses/27c7827c47a6863180436bb12e57a9d4b52e6084"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"gnodet","id":84022,"avatar_url":"https://avatars.githubusercontent.com/u/84022?v=3","gravatar_id":"","url":"https://api.github.com/users/gnodet","html_url":"https://github.com/gnodet","followers_url":"https://api.github.com/users/gnodet/followers","following_url":"https://api.github.com/users/gnodet/following{/other_user}","gists_url":"https://api.github.com/users/gnodet/gists{/gist_id}","starred_url":"https://api.github.com/users/gnodet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnodet/subscriptions","organizations_url":"https://api.github.com/users/gnodet/orgs","repos_url":"https://api.github.com/users/gnodet/repos","events_url":"https://api.github.com/users/gnodet/events{/privacy}","received_events_url":"https://api.github.com/users/gnodet/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":2,"additions":10,"deletions":7,"changed_files":2}}
{"actor":{"display_login":"gnodet"}}