{"action":"created","comment":{"url":"https://api.github.com/repos/u-root/u-root/pulls/comments/100584499","pull_request_review_id":21298735,"id":100584499,"diff_hunk":"@@ -0,0 +1,59 @@\n+\n+// Copyright 2012-2017 the u-root Authors. All rights reserved\n+// Use of this source code is governed by a BSD-style\n+// license that can be found in the LICENSE file.\n+\n+package main\n+\n+import (\n+\t\"fmt\"\n+\t\"os\"\n+\t\"os/signal\"\n+\t\"syscall\"\n+\t\"unsafe\"\n+)\n+\n+const (\n+\tSYS_ioctl         = 16\n+)\n+func tty() {\n+\tsigs := make(chan os.Signal, 1)\n+\tsignal.Notify(sigs, os.Interrupt)\n+\tgo func() {\n+\t\tfor {\n+\t\t\t_ = <- sigs\n+\t\t\tfmt.Print(\"\")\n+\t\t}\n+\t}()\n+}\n+\n+// it's not clear we will ever need this.","path":"cmds/rush/tty_linux.go","position":30,"original_position":30,"commit_id":"29cf70c9b071f124d3c13b4b8b4ba5947ad57ffb","original_commit_id":"29cf70c9b071f124d3c13b4b8b4ba5947ad57ffb","user":{"login":"rjoleary","id":2763535,"avatar_url":"https://avatars.githubusercontent.com/u/2763535?v=3","gravatar_id":"","url":"https://api.github.com/users/rjoleary","html_url":"https://github.com/rjoleary","followers_url":"https://api.github.com/users/rjoleary/followers","following_url":"https://api.github.com/users/rjoleary/following{/other_user}","gists_url":"https://api.github.com/users/rjoleary/gists{/gist_id}","starred_url":"https://api.github.com/users/rjoleary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjoleary/subscriptions","organizations_url":"https://api.github.com/users/rjoleary/orgs","repos_url":"https://api.github.com/users/rjoleary/repos","events_url":"https://api.github.com/users/rjoleary/events{/privacy}","received_events_url":"https://api.github.com/users/rjoleary/received_events","type":"User","site_admin":false},"body":"We should probably not keep it if it is never needed.","created_at":"2017-02-10T17:36:13Z","updated_at":"2017-02-10T17:41:08Z","html_url":"https://github.com/u-root/u-root/pull/148#discussion_r100584499","pull_request_url":"https://api.github.com/repos/u-root/u-root/pulls/148","_links":{"self":{"href":"https://api.github.com/repos/u-root/u-root/pulls/comments/100584499"},"html":{"href":"https://github.com/u-root/u-root/pull/148#discussion_r100584499"},"pull_request":{"href":"https://api.github.com/repos/u-root/u-root/pulls/148"}}},"pull_request":{"url":"https://api.github.com/repos/u-root/u-root/pulls/148","id":105658963,"html_url":"https://github.com/u-root/u-root/pull/148","diff_url":"https://github.com/u-root/u-root/pull/148.diff","patch_url":"https://github.com/u-root/u-root/pull/148.patch","issue_url":"https://api.github.com/repos/u-root/u-root/issues/148","number":148,"state":"open","locked":false,"title":"rush: add handling for ^c","user":{"login":"rminnich","id":74928,"avatar_url":"https://avatars.githubusercontent.com/u/74928?v=3","gravatar_id":"","url":"https://api.github.com/users/rminnich","html_url":"https://github.com/rminnich","followers_url":"https://api.github.com/users/rminnich/followers","following_url":"https://api.github.com/users/rminnich/following{/other_user}","gists_url":"https://api.github.com/users/rminnich/gists{/gist_id}","starred_url":"https://api.github.com/users/rminnich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rminnich/subscriptions","organizations_url":"https://api.github.com/users/rminnich/orgs","repos_url":"https://api.github.com/users/rminnich/repos","events_url":"https://api.github.com/users/rminnich/events{/privacy}","received_events_url":"https://api.github.com/users/rminnich/received_events","type":"User","site_admin":false},"body":"This turned out to be easy. Also, it is contained in a tty() function\nwhich we will need for all OSes. The current tty() is os-independent\nbut we don't expect that to last.\n\nSigned-off-by: Ronald G. Minnich <rminnich@gmail.com>","created_at":"2017-02-10T16:21:25Z","updated_at":"2017-02-10T17:41:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d168796267ab8156b721098edea356cb402b25f2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/u-root/u-root/pulls/148/commits","review_comments_url":"https://api.github.com/repos/u-root/u-root/pulls/148/comments","review_comment_url":"https://api.github.com/repos/u-root/u-root/pulls/comments{/number}","comments_url":"https://api.github.com/repos/u-root/u-root/issues/148/comments","statuses_url":"https://api.github.com/repos/u-root/u-root/statuses/29cf70c9b071f124d3c13b4b8b4ba5947ad57ffb","head":{"label":"rminnich:ttyhandling","ref":"ttyhandling","sha":"29cf70c9b071f124d3c13b4b8b4ba5947ad57ffb","user":{"login":"rminnich","id":74928,"avatar_url":"https://avatars.githubusercontent.com/u/74928?v=3","gravatar_id":"","url":"https://api.github.com/users/rminnich","html_url":"https://github.com/rminnich","followers_url":"https://api.github.com/users/rminnich/followers","following_url":"https://api.github.com/users/rminnich/following{/other_user}","gists_url":"https://api.github.com/users/rminnich/gists{/gist_id}","starred_url":"https://api.github.com/users/rminnich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rminnich/subscriptions","organizations_url":"https://api.github.com/users/rminnich/orgs","repos_url":"https://api.github.com/users/rminnich/repos","events_url":"https://api.github.com/users/rminnich/events{/privacy}","received_events_url":"https://api.github.com/users/rminnich/received_events","type":"User","site_admin":false},"repo":{"id":53349408,"name":"u-root","full_name":"rminnich/u-root","owner":{"login":"rminnich","id":74928,"avatar_url":"https://avatars.githubusercontent.com/u/74928?v=3","gravatar_id":"","url":"https://api.github.com/users/rminnich","html_url":"https://github.com/rminnich","followers_url":"https://api.github.com/users/rminnich/followers","following_url":"https://api.github.com/users/rminnich/following{/other_user}","gists_url":"https://api.github.com/users/rminnich/gists{/gist_id}","starred_url":"https://api.github.com/users/rminnich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rminnich/subscriptions","organizations_url":"https://api.github.com/users/rminnich/orgs","repos_url":"https://api.github.com/users/rminnich/repos","events_url":"https://api.github.com/users/rminnich/events{/privacy}","received_events_url":"https://api.github.com/users/rminnich/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rminnich/u-root","description":"A universal root. You mount it, and it's mostly Go source with the exception of 5 binaries. ","fork":true,"url":"https://api.github.com/repos/rminnich/u-root","forks_url":"https://api.github.com/repos/rminnich/u-root/forks","keys_url":"https://api.github.com/repos/rminnich/u-root/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rminnich/u-root/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rminnich/u-root/teams","hooks_url":"https://api.github.com/repos/rminnich/u-root/hooks","issue_events_url":"https://api.github.com/repos/rminnich/u-root/issues/events{/number}","events_url":"https://api.github.com/repos/rminnich/u-root/events","assignees_url":"https://api.github.com/repos/rminnich/u-root/assignees{/user}","branches_url":"https://api.github.com/repos/rminnich/u-root/branches{/branch}","tags_url":"https://api.github.com/repos/rminnich/u-root/tags","blobs_url":"https://api.github.com/repos/rminnich/u-root/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rminnich/u-root/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rminnich/u-root/git/refs{/sha}","trees_url":"https://api.github.com/repos/rminnich/u-root/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rminnich/u-root/statuses/{sha}","languages_url":"https://api.github.com/repos/rminnich/u-root/languages","stargazers_url":"https://api.github.com/repos/rminnich/u-root/stargazers","contributors_url":"https://api.github.com/repos/rminnich/u-root/contributors","subscribers_url":"https://api.github.com/repos/rminnich/u-root/subscribers","subscription_url":"https://api.github.com/repos/rminnich/u-root/subscription","commits_url":"https://api.github.com/repos/rminnich/u-root/commits{/sha}","git_commits_url":"https://api.github.com/repos/rminnich/u-root/git/commits{/sha}","comments_url":"https://api.github.com/repos/rminnich/u-root/comments{/number}","issue_comment_url":"https://api.github.com/repos/rminnich/u-root/issues/comments{/number}","contents_url":"https://api.github.com/repos/rminnich/u-root/contents/{+path}","compare_url":"https://api.github.com/repos/rminnich/u-root/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rminnich/u-root/merges","archive_url":"https://api.github.com/repos/rminnich/u-root/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rminnich/u-root/downloads","issues_url":"https://api.github.com/repos/rminnich/u-root/issues{/number}","pulls_url":"https://api.github.com/repos/rminnich/u-root/pulls{/number}","milestones_url":"https://api.github.com/repos/rminnich/u-root/milestones{/number}","notifications_url":"https://api.github.com/repos/rminnich/u-root/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rminnich/u-root/labels{/name}","releases_url":"https://api.github.com/repos/rminnich/u-root/releases{/id}","deployments_url":"https://api.github.com/repos/rminnich/u-root/deployments","created_at":"2016-03-07T18:40:47Z","updated_at":"2016-09-01T04:58:26Z","pushed_at":"2017-02-10T16:21:14Z","git_url":"git://github.com/rminnich/u-root.git","ssh_url":"git@github.com:rminnich/u-root.git","clone_url":"https://github.com/rminnich/u-root.git","svn_url":"https://github.com/rminnich/u-root","homepage":null,"size":13091,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"u-root:master","ref":"master","sha":"398f3030991ded4e3d3eb5e5741bdef43a5f8ebd","user":{"login":"u-root","id":13317538,"avatar_url":"https://avatars.githubusercontent.com/u/13317538?v=3","gravatar_id":"","url":"https://api.github.com/users/u-root","html_url":"https://github.com/u-root","followers_url":"https://api.github.com/users/u-root/followers","following_url":"https://api.github.com/users/u-root/following{/other_user}","gists_url":"https://api.github.com/users/u-root/gists{/gist_id}","starred_url":"https://api.github.com/users/u-root/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/u-root/subscriptions","organizations_url":"https://api.github.com/users/u-root/orgs","repos_url":"https://api.github.com/users/u-root/repos","events_url":"https://api.github.com/users/u-root/events{/privacy}","received_events_url":"https://api.github.com/users/u-root/received_events","type":"Organization","site_admin":false},"repo":{"id":46462030,"name":"u-root","full_name":"u-root/u-root","owner":{"login":"u-root","id":13317538,"avatar_url":"https://avatars.githubusercontent.com/u/13317538?v=3","gravatar_id":"","url":"https://api.github.com/users/u-root","html_url":"https://github.com/u-root","followers_url":"https://api.github.com/users/u-root/followers","following_url":"https://api.github.com/users/u-root/following{/other_user}","gists_url":"https://api.github.com/users/u-root/gists{/gist_id}","starred_url":"https://api.github.com/users/u-root/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/u-root/subscriptions","organizations_url":"https://api.github.com/users/u-root/orgs","repos_url":"https://api.github.com/users/u-root/repos","events_url":"https://api.github.com/users/u-root/events{/privacy}","received_events_url":"https://api.github.com/users/u-root/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/u-root/u-root","description":"A universal root. You mount it, and it's mostly Go source with the exception of 5 binaries. ","fork":false,"url":"https://api.github.com/repos/u-root/u-root","forks_url":"https://api.github.com/repos/u-root/u-root/forks","keys_url":"https://api.github.com/repos/u-root/u-root/keys{/key_id}","collaborators_url":"https://api.github.com/repos/u-root/u-root/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/u-root/u-root/teams","hooks_url":"https://api.github.com/repos/u-root/u-root/hooks","issue_events_url":"https://api.github.com/repos/u-root/u-root/issues/events{/number}","events_url":"https://api.github.com/repos/u-root/u-root/events","assignees_url":"https://api.github.com/repos/u-root/u-root/assignees{/user}","branches_url":"https://api.github.com/repos/u-root/u-root/branches{/branch}","tags_url":"https://api.github.com/repos/u-root/u-root/tags","blobs_url":"https://api.github.com/repos/u-root/u-root/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/u-root/u-root/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/u-root/u-root/git/refs{/sha}","trees_url":"https://api.github.com/repos/u-root/u-root/git/trees{/sha}","statuses_url":"https://api.github.com/repos/u-root/u-root/statuses/{sha}","languages_url":"https://api.github.com/repos/u-root/u-root/languages","stargazers_url":"https://api.github.com/repos/u-root/u-root/stargazers","contributors_url":"https://api.github.com/repos/u-root/u-root/contributors","subscribers_url":"https://api.github.com/repos/u-root/u-root/subscribers","subscription_url":"https://api.github.com/repos/u-root/u-root/subscription","commits_url":"https://api.github.com/repos/u-root/u-root/commits{/sha}","git_commits_url":"https://api.github.com/repos/u-root/u-root/git/commits{/sha}","comments_url":"https://api.github.com/repos/u-root/u-root/comments{/number}","issue_comment_url":"https://api.github.com/repos/u-root/u-root/issues/comments{/number}","contents_url":"https://api.github.com/repos/u-root/u-root/contents/{+path}","compare_url":"https://api.github.com/repos/u-root/u-root/compare/{base}...{head}","merges_url":"https://api.github.com/repos/u-root/u-root/merges","archive_url":"https://api.github.com/repos/u-root/u-root/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/u-root/u-root/downloads","issues_url":"https://api.github.com/repos/u-root/u-root/issues{/number}","pulls_url":"https://api.github.com/repos/u-root/u-root/pulls{/number}","milestones_url":"https://api.github.com/repos/u-root/u-root/milestones{/number}","notifications_url":"https://api.github.com/repos/u-root/u-root/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/u-root/u-root/labels{/name}","releases_url":"https://api.github.com/repos/u-root/u-root/releases{/id}","deployments_url":"https://api.github.com/repos/u-root/u-root/deployments","created_at":"2015-11-19T02:28:59Z","updated_at":"2017-01-30T08:54:40Z","pushed_at":"2017-02-10T16:21:26Z","git_url":"git://github.com/u-root/u-root.git","ssh_url":"git@github.com:u-root/u-root.git","clone_url":"https://github.com/u-root/u-root.git","svn_url":"https://github.com/u-root/u-root","homepage":"http://u-root.tk","size":14786,"stargazers_count":13,"watchers_count":13,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":16,"forks":8,"open_issues":16,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/u-root/u-root/pulls/148"},"html":{"href":"https://github.com/u-root/u-root/pull/148"},"issue":{"href":"https://api.github.com/repos/u-root/u-root/issues/148"},"comments":{"href":"https://api.github.com/repos/u-root/u-root/issues/148/comments"},"review_comments":{"href":"https://api.github.com/repos/u-root/u-root/pulls/148/comments"},"review_comment":{"href":"https://api.github.com/repos/u-root/u-root/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/u-root/u-root/pulls/148/commits"},"statuses":{"href":"https://api.github.com/repos/u-root/u-root/statuses/29cf70c9b071f124d3c13b4b8b4ba5947ad57ffb"}}}}
{"actor":{"display_login":"rjoleary"}}