{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments/27777729","id":27777729,"diff_hunk":"@@ -492,10 +489,14 @@ def build\n     end\n \n     ignore_interrupts(:quietly) do # the child will receive the interrupt and marshal it back\n+      socket = socket_serv.accept\n+      socket.send_io write\n       write.close\n       data = read.read\n       read.close\n       Process.wait(pid)\n+      socket_serv.close\n+      FileUtils.rm_r File.dirname(socket_path)","path":"Library/Homebrew/formula_installer.rb","position":43,"original_position":43,"commit_id":"f59b1e89f4a4f49d14f5332ba23cb4564989f386","original_commit_id":"f59b1e89f4a4f49d14f5332ba23cb4564989f386","user":{"login":"jacknagel","id":568243,"avatar_url":"https://avatars.githubusercontent.com/u/568243?v=3","gravatar_id":"","url":"https://api.github.com/users/jacknagel","html_url":"https://github.com/jacknagel","followers_url":"https://api.github.com/users/jacknagel/followers","following_url":"https://api.github.com/users/jacknagel/following{/other_user}","gists_url":"https://api.github.com/users/jacknagel/gists{/gist_id}","starred_url":"https://api.github.com/users/jacknagel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacknagel/subscriptions","organizations_url":"https://api.github.com/users/jacknagel/orgs","repos_url":"https://api.github.com/users/jacknagel/repos","events_url":"https://api.github.com/users/jacknagel/events{/privacy}","received_events_url":"https://api.github.com/users/jacknagel/received_events","type":"User","site_admin":false},"body":"The creation of this file should probably be at the very beginning of the method, and then this line in an ensure block at the end.","created_at":"2015-04-05T14:33:09Z","updated_at":"2015-04-05T14:33:09Z","html_url":"https://github.com/Homebrew/homebrew/pull/38382#discussion_r27777729","pull_request_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/38382","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments/27777729"},"html":{"href":"https://github.com/Homebrew/homebrew/pull/38382#discussion_r27777729"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/38382"}}},"pull_request":{"url":"https://api.github.com/repos/Homebrew/homebrew/pulls/38382","id":32645704,"html_url":"https://github.com/Homebrew/homebrew/pull/38382","diff_url":"https://github.com/Homebrew/homebrew/pull/38382.diff","patch_url":"https://github.com/Homebrew/homebrew/pull/38382.patch","issue_url":"https://api.github.com/repos/Homebrew/homebrew/issues/38382","number":38382,"state":"open","locked":false,"title":"Use UNIXSocket to pass file descriptor","user":{"login":"xu-cheng","id":3105373,"avatar_url":"https://avatars.githubusercontent.com/u/3105373?v=3","gravatar_id":"","url":"https://api.github.com/users/xu-cheng","html_url":"https://github.com/xu-cheng","followers_url":"https://api.github.com/users/xu-cheng/followers","following_url":"https://api.github.com/users/xu-cheng/following{/other_user}","gists_url":"https://api.github.com/users/xu-cheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xu-cheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xu-cheng/subscriptions","organizations_url":"https://api.github.com/users/xu-cheng/orgs","repos_url":"https://api.github.com/users/xu-cheng/repos","events_url":"https://api.github.com/users/xu-cheng/events{/privacy}","received_events_url":"https://api.github.com/users/xu-cheng/received_events","type":"User","site_admin":false},"body":"This is a more standard way to pass fd in UNIX world. At the same time, it helps to remove a few hacks and simplifies the code in the sandbox.(I can remove a `fork` block because `exec` can now be replaced with `system`)\r\n\r\ncc @jacknagel ","created_at":"2015-04-05T08:00:43Z","updated_at":"2015-04-05T14:33:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4bcfaff831f5f460fbe2b9f90e1cfd29f2f151b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/38382/commits","review_comments_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/38382/comments","review_comment_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/homebrew/issues/38382/comments","statuses_url":"https://api.github.com/repos/Homebrew/homebrew/statuses/f59b1e89f4a4f49d14f5332ba23cb4564989f386","head":{"label":"xu-cheng:socket","ref":"socket","sha":"f59b1e89f4a4f49d14f5332ba23cb4564989f386","user":{"login":"xu-cheng","id":3105373,"avatar_url":"https://avatars.githubusercontent.com/u/3105373?v=3","gravatar_id":"","url":"https://api.github.com/users/xu-cheng","html_url":"https://github.com/xu-cheng","followers_url":"https://api.github.com/users/xu-cheng/followers","following_url":"https://api.github.com/users/xu-cheng/following{/other_user}","gists_url":"https://api.github.com/users/xu-cheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xu-cheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xu-cheng/subscriptions","organizations_url":"https://api.github.com/users/xu-cheng/orgs","repos_url":"https://api.github.com/users/xu-cheng/repos","events_url":"https://api.github.com/users/xu-cheng/events{/privacy}","received_events_url":"https://api.github.com/users/xu-cheng/received_events","type":"User","site_admin":false},"repo":{"id":17541180,"name":"homebrew","full_name":"xu-cheng/homebrew","owner":{"login":"xu-cheng","id":3105373,"avatar_url":"https://avatars.githubusercontent.com/u/3105373?v=3","gravatar_id":"","url":"https://api.github.com/users/xu-cheng","html_url":"https://github.com/xu-cheng","followers_url":"https://api.github.com/users/xu-cheng/followers","following_url":"https://api.github.com/users/xu-cheng/following{/other_user}","gists_url":"https://api.github.com/users/xu-cheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xu-cheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xu-cheng/subscriptions","organizations_url":"https://api.github.com/users/xu-cheng/orgs","repos_url":"https://api.github.com/users/xu-cheng/repos","events_url":"https://api.github.com/users/xu-cheng/events{/privacy}","received_events_url":"https://api.github.com/users/xu-cheng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xu-cheng/homebrew","description":"The missing package manager for OS X.","fork":true,"url":"https://api.github.com/repos/xu-cheng/homebrew","forks_url":"https://api.github.com/repos/xu-cheng/homebrew/forks","keys_url":"https://api.github.com/repos/xu-cheng/homebrew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xu-cheng/homebrew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xu-cheng/homebrew/teams","hooks_url":"https://api.github.com/repos/xu-cheng/homebrew/hooks","issue_events_url":"https://api.github.com/repos/xu-cheng/homebrew/issues/events{/number}","events_url":"https://api.github.com/repos/xu-cheng/homebrew/events","assignees_url":"https://api.github.com/repos/xu-cheng/homebrew/assignees{/user}","branches_url":"https://api.github.com/repos/xu-cheng/homebrew/branches{/branch}","tags_url":"https://api.github.com/repos/xu-cheng/homebrew/tags","blobs_url":"https://api.github.com/repos/xu-cheng/homebrew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xu-cheng/homebrew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xu-cheng/homebrew/git/refs{/sha}","trees_url":"https://api.github.com/repos/xu-cheng/homebrew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xu-cheng/homebrew/statuses/{sha}","languages_url":"https://api.github.com/repos/xu-cheng/homebrew/languages","stargazers_url":"https://api.github.com/repos/xu-cheng/homebrew/stargazers","contributors_url":"https://api.github.com/repos/xu-cheng/homebrew/contributors","subscribers_url":"https://api.github.com/repos/xu-cheng/homebrew/subscribers","subscription_url":"https://api.github.com/repos/xu-cheng/homebrew/subscription","commits_url":"https://api.github.com/repos/xu-cheng/homebrew/commits{/sha}","git_commits_url":"https://api.github.com/repos/xu-cheng/homebrew/git/commits{/sha}","comments_url":"https://api.github.com/repos/xu-cheng/homebrew/comments{/number}","issue_comment_url":"https://api.github.com/repos/xu-cheng/homebrew/issues/comments{/number}","contents_url":"https://api.github.com/repos/xu-cheng/homebrew/contents/{+path}","compare_url":"https://api.github.com/repos/xu-cheng/homebrew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xu-cheng/homebrew/merges","archive_url":"https://api.github.com/repos/xu-cheng/homebrew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xu-cheng/homebrew/downloads","issues_url":"https://api.github.com/repos/xu-cheng/homebrew/issues{/number}","pulls_url":"https://api.github.com/repos/xu-cheng/homebrew/pulls{/number}","milestones_url":"https://api.github.com/repos/xu-cheng/homebrew/milestones{/number}","notifications_url":"https://api.github.com/repos/xu-cheng/homebrew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xu-cheng/homebrew/labels{/name}","releases_url":"https://api.github.com/repos/xu-cheng/homebrew/releases{/id}","created_at":"2014-03-08T12:05:07Z","updated_at":"2015-04-05T08:27:06Z","pushed_at":"2015-04-05T08:39:37Z","git_url":"git://github.com/xu-cheng/homebrew.git","ssh_url":"git@github.com:xu-cheng/homebrew.git","clone_url":"https://github.com/xu-cheng/homebrew.git","svn_url":"https://github.com/xu-cheng/homebrew","homepage":"http://brew.sh","size":37371,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"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":"Homebrew:master","ref":"master","sha":"834f2b186347f804f2b48f97ee133f953d6533ef","user":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"repo":{"id":206084,"name":"homebrew","full_name":"Homebrew/homebrew","owner":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Homebrew/homebrew","description":"The missing package manager for OS X.","fork":false,"url":"https://api.github.com/repos/Homebrew/homebrew","forks_url":"https://api.github.com/repos/Homebrew/homebrew/forks","keys_url":"https://api.github.com/repos/Homebrew/homebrew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Homebrew/homebrew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Homebrew/homebrew/teams","hooks_url":"https://api.github.com/repos/Homebrew/homebrew/hooks","issue_events_url":"https://api.github.com/repos/Homebrew/homebrew/issues/events{/number}","events_url":"https://api.github.com/repos/Homebrew/homebrew/events","assignees_url":"https://api.github.com/repos/Homebrew/homebrew/assignees{/user}","branches_url":"https://api.github.com/repos/Homebrew/homebrew/branches{/branch}","tags_url":"https://api.github.com/repos/Homebrew/homebrew/tags","blobs_url":"https://api.github.com/repos/Homebrew/homebrew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Homebrew/homebrew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Homebrew/homebrew/git/refs{/sha}","trees_url":"https://api.github.com/repos/Homebrew/homebrew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Homebrew/homebrew/statuses/{sha}","languages_url":"https://api.github.com/repos/Homebrew/homebrew/languages","stargazers_url":"https://api.github.com/repos/Homebrew/homebrew/stargazers","contributors_url":"https://api.github.com/repos/Homebrew/homebrew/contributors","subscribers_url":"https://api.github.com/repos/Homebrew/homebrew/subscribers","subscription_url":"https://api.github.com/repos/Homebrew/homebrew/subscription","commits_url":"https://api.github.com/repos/Homebrew/homebrew/commits{/sha}","git_commits_url":"https://api.github.com/repos/Homebrew/homebrew/git/commits{/sha}","comments_url":"https://api.github.com/repos/Homebrew/homebrew/comments{/number}","issue_comment_url":"https://api.github.com/repos/Homebrew/homebrew/issues/comments{/number}","contents_url":"https://api.github.com/repos/Homebrew/homebrew/contents/{+path}","compare_url":"https://api.github.com/repos/Homebrew/homebrew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Homebrew/homebrew/merges","archive_url":"https://api.github.com/repos/Homebrew/homebrew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Homebrew/homebrew/downloads","issues_url":"https://api.github.com/repos/Homebrew/homebrew/issues{/number}","pulls_url":"https://api.github.com/repos/Homebrew/homebrew/pulls{/number}","milestones_url":"https://api.github.com/repos/Homebrew/homebrew/milestones{/number}","notifications_url":"https://api.github.com/repos/Homebrew/homebrew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Homebrew/homebrew/labels{/name}","releases_url":"https://api.github.com/repos/Homebrew/homebrew/releases{/id}","created_at":"2009-05-20T19:38:37Z","updated_at":"2015-04-05T11:29:12Z","pushed_at":"2015-04-05T14:14:56Z","git_url":"git://github.com/Homebrew/homebrew.git","ssh_url":"git@github.com:Homebrew/homebrew.git","clone_url":"https://github.com/Homebrew/homebrew.git","svn_url":"https://github.com/Homebrew/homebrew","homepage":"http://brew.sh","size":1487838,"stargazers_count":22279,"watchers_count":22279,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":11147,"mirror_url":null,"open_issues_count":411,"forks":11147,"open_issues":411,"watchers":22279,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/38382"},"html":{"href":"https://github.com/Homebrew/homebrew/pull/38382"},"issue":{"href":"https://api.github.com/repos/Homebrew/homebrew/issues/38382"},"comments":{"href":"https://api.github.com/repos/Homebrew/homebrew/issues/38382/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/38382/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/38382/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/homebrew/statuses/f59b1e89f4a4f49d14f5332ba23cb4564989f386"}}}}