GitHub PullRequestReviewCommentEvent at 2014-06-10 11:41:43
Repository: rust
Actor: huonw
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/rust/pulls/comments/13588570","id":13588570,"diff_hunk":"@@ -492,33 +493,44 @@ pub struct Pipe {\n }\n \n /// Creates a new low-level OS in-memory pipe.\n+///\n+/// This function can fail to succeed if there are no more resources available\n+/// to allocate a pipe.\n+///\n+/// This function is also unsafe as there is no destructor associated with the\n+/// `Pipe` structure will return. If it is not arranged for the returned file\n+/// descriptors to be closed, the file descriptors will leak. For safe handling\n+/// of this scenario, use `PipeStream` instead.\n #[cfg(unix)]\n-pub fn pipe() -> Pipe {\n-    unsafe {\n-        let mut fds = Pipe {input: 0,\n-                            out: 0};\n-        assert_eq!(libc::pipe(&mut fds.input), 0);\n-        return Pipe {input: fds.input, out: fds.out};\n+pub unsafe fn pipe() -> IoResult<Pipe> {","path":"src/libstd/os.rs","position":27,"original_position":27,"commit_id":"9092b3067fa97ebaba966853165d11347b413c14","original_commit_id":"9092b3067fa97ebaba966853165d11347b413c14","user":{"login":"huonw","id":1203825,"avatar_url":"https://avatars.githubusercontent.com/u/1203825?","gravatar_id":"365f3c2704e4744e237651f3c2a7c411","url":"https://api.github.com/users/huonw","html_url":"https://github.com/huonw","followers_url":"https://api.github.com/users/huonw/followers","following_url":"https://api.github.com/users/huonw/following{/other_user}","gists_url":"https://api.github.com/users/huonw/gists{/gist_id}","starred_url":"https://api.github.com/users/huonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huonw/subscriptions","organizations_url":"https://api.github.com/users/huonw/orgs","repos_url":"https://api.github.com/users/huonw/repos","events_url":"https://api.github.com/users/huonw/events{/privacy}","received_events_url":"https://api.github.com/users/huonw/received_events","type":"User","site_admin":false},"body":"Maybe this could be `raw_pipe` or something?","created_at":"2014-06-10T11:41:43Z","updated_at":"2014-06-10T11:41:43Z","html_url":"https://github.com/mozilla/rust/pull/14781#discussion_r13588570","pull_request_url":"https://api.github.com/repos/mozilla/rust/pulls/14781","_links":{"self":{"href":"https://api.github.com/repos/mozilla/rust/pulls/comments/13588570"},"html":{"href":"https://github.com/mozilla/rust/pull/14781#discussion_r13588570"},"pull_request":{"href":"https://api.github.com/repos/mozilla/rust/pulls/14781"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/rust/pulls/14781","id":16908885,"html_url":"https://github.com/mozilla/rust/pull/14781","diff_url":"https://github.com/mozilla/rust/pull/14781.diff","patch_url":"https://github.com/mozilla/rust/pull/14781.patch","issue_url":"https://api.github.com/repos/mozilla/rust/issues/14781","number":14781,"state":"open","title":"std: Improve pipe functionality","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?","gravatar_id":"477e2098d9864b482d28e5ef8e657f43","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"body":"* os::pipe() now returns `IoResult<os::Pipe>`\r\n* os::pipe() is now unsafe because it does not arrange for deallocation of file\r\n  descriptors\r\n* PipeStream::pair() has been added. This is a safe method to get a pair of\r\n  pipes.\r\n* Dealing with pipes in native process bindings have been improved to be more\r\n  robust in the face of failure and intermittent errors. This converts a few\r\n  fail!() situations to Err situations.\r\n\r\ncc #13538\r\nCloses #14724\r\n[breaking-change]","created_at":"2014-06-09T21:17:25Z","updated_at":"2014-06-10T11:41:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"10ddb6785a619d7f2719944eed718835428dbea0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/rust/pulls/14781/commits","review_comments_url":"https://api.github.com/repos/mozilla/rust/pulls/14781/comments","review_comment_url":"https://api.github.com/repos/mozilla/rust/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla/rust/issues/14781/comments","statuses_url":"https://api.github.com/repos/mozilla/rust/statuses/9092b3067fa97ebaba966853165d11347b413c14","head":{"label":"alexcrichton:issue-14724","ref":"issue-14724","sha":"9092b3067fa97ebaba966853165d11347b413c14","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?","gravatar_id":"477e2098d9864b482d28e5ef8e657f43","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"repo":{"id":7385331,"name":"rust","full_name":"alexcrichton/rust","owner":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?","gravatar_id":"477e2098d9864b482d28e5ef8e657f43","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexcrichton/rust","description":"a safe, concurrent, practical language","fork":true,"url":"https://api.github.com/repos/alexcrichton/rust","forks_url":"https://api.github.com/repos/alexcrichton/rust/forks","keys_url":"https://api.github.com/repos/alexcrichton/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexcrichton/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexcrichton/rust/teams","hooks_url":"https://api.github.com/repos/alexcrichton/rust/hooks","issue_events_url":"https://api.github.com/repos/alexcrichton/rust/issues/events{/number}","events_url":"https://api.github.com/repos/alexcrichton/rust/events","assignees_url":"https://api.github.com/repos/alexcrichton/rust/assignees{/user}","branches_url":"https://api.github.com/repos/alexcrichton/rust/branches{/branch}","tags_url":"https://api.github.com/repos/alexcrichton/rust/tags","blobs_url":"https://api.github.com/repos/alexcrichton/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexcrichton/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexcrichton/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexcrichton/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexcrichton/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/alexcrichton/rust/languages","stargazers_url":"https://api.github.com/repos/alexcrichton/rust/stargazers","contributors_url":"https://api.github.com/repos/alexcrichton/rust/contributors","subscribers_url":"https://api.github.com/repos/alexcrichton/rust/subscribers","subscription_url":"https://api.github.com/repos/alexcrichton/rust/subscription","commits_url":"https://api.github.com/repos/alexcrichton/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexcrichton/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexcrichton/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexcrichton/rust/issues/comments/{number}","contents_url":"https://api.github.com/repos/alexcrichton/rust/contents/{+path}","compare_url":"https://api.github.com/repos/alexcrichton/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexcrichton/rust/merges","archive_url":"https://api.github.com/repos/alexcrichton/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexcrichton/rust/downloads","issues_url":"https://api.github.com/repos/alexcrichton/rust/issues{/number}","pulls_url":"https://api.github.com/repos/alexcrichton/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/alexcrichton/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/alexcrichton/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexcrichton/rust/labels{/name}","releases_url":"https://api.github.com/repos/alexcrichton/rust/releases{/id}","created_at":"2012-12-31T08:59:51Z","updated_at":"2014-06-10T07:02:40Z","pushed_at":"2014-06-10T07:02:39Z","git_url":"git://github.com/alexcrichton/rust.git","ssh_url":"git@github.com:alexcrichton/rust.git","clone_url":"https://github.com/alexcrichton/rust.git","svn_url":"https://github.com/alexcrichton/rust","homepage":"http://www.rust-lang.org","size":171346,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"incoming"}},"base":{"label":"mozilla:master","ref":"master","sha":"5bc2d03955618664377e98352d784a7f145db24a","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?","gravatar_id":"9ba739c8f3288e256b13553e4d257b5e","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":724712,"name":"rust","full_name":"mozilla/rust","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?","gravatar_id":"9ba739c8f3288e256b13553e4d257b5e","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/rust","description":"a safe, concurrent, practical language","fork":false,"url":"https://api.github.com/repos/mozilla/rust","forks_url":"https://api.github.com/repos/mozilla/rust/forks","keys_url":"https://api.github.com/repos/mozilla/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/rust/teams","hooks_url":"https://api.github.com/repos/mozilla/rust/hooks","issue_events_url":"https://api.github.com/repos/mozilla/rust/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/rust/events","assignees_url":"https://api.github.com/repos/mozilla/rust/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/rust/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/rust/tags","blobs_url":"https://api.github.com/repos/mozilla/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/rust/languages","stargazers_url":"https://api.github.com/repos/mozilla/rust/stargazers","contributors_url":"https://api.github.com/repos/mozilla/rust/contributors","subscribers_url":"https://api.github.com/repos/mozilla/rust/subscribers","subscription_url":"https://api.github.com/repos/mozilla/rust/subscription","commits_url":"https://api.github.com/repos/mozilla/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/rust/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla/rust/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/rust/merges","archive_url":"https://api.github.com/repos/mozilla/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/rust/downloads","issues_url":"https://api.github.com/repos/mozilla/rust/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/rust/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/rust/releases{/id}","created_at":"2010-06-16T20:39:03Z","updated_at":"2014-06-10T11:01:55Z","pushed_at":"2014-06-10T11:01:55Z","git_url":"git://github.com/mozilla/rust.git","ssh_url":"git@github.com:mozilla/rust.git","clone_url":"https://github.com/mozilla/rust.git","svn_url":"https://github.com/mozilla/rust","homepage":"http://www.rust-lang.org","size":362617,"stargazers_count":5257,"watchers_count":5257,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":1090,"mirror_url":null,"open_issues_count":1591,"forks":1090,"open_issues":1591,"watchers":5257,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/rust/pulls/14781"},"html":{"href":"https://github.com/mozilla/rust/pull/14781"},"issue":{"href":"https://api.github.com/repos/mozilla/rust/issues/14781"},"comments":{"href":"https://api.github.com/repos/mozilla/rust/issues/14781/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/rust/pulls/14781/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/rust/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla/rust/pulls/14781/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/rust/statuses/9092b3067fa97ebaba966853165d11347b413c14"}}}}