{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/47946","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/47946/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/47946/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/47946/events","html_url":"https://github.com/rust-lang/rust/issues/47946","id":293681387,"number":47946,"title":"TcpSocket try_clone() sets close-on-exec but this isn't documented","user":{"login":"setharnold","id":5447148,"avatar_url":"https://avatars1.githubusercontent.com/u/5447148?v=4","gravatar_id":"","url":"https://api.github.com/users/setharnold","html_url":"https://github.com/setharnold","followers_url":"https://api.github.com/users/setharnold/followers","following_url":"https://api.github.com/users/setharnold/following{/other_user}","gists_url":"https://api.github.com/users/setharnold/gists{/gist_id}","starred_url":"https://api.github.com/users/setharnold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/setharnold/subscriptions","organizations_url":"https://api.github.com/users/setharnold/orgs","repos_url":"https://api.github.com/users/setharnold/repos","events_url":"https://api.github.com/users/setharnold/events{/privacy}","received_events_url":"https://api.github.com/users/setharnold/received_events","type":"User","site_admin":false},"labels":[{"id":234902,"url":"https://api.github.com/repos/rust-lang/rust/labels/C-enhancement","name":"C-enhancement","color":"f5f1fd","default":false},{"id":431251592,"url":"https://api.github.com/repos/rust-lang/rust/labels/T-doc","name":"T-doc","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-01T20:59:01Z","updated_at":"2018-05-29T08:57:54Z","closed_at":null,"author_association":"NONE","body":"Hello, the TcpSocket try_clone() method calls into .duplicate(), which sets the close-on-exec flag on the socket:\r\n\r\nhttps://doc.rust-lang.org/src/std/net/tcp.rs.html#255-257\r\nhttps://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/fd.rs#L197\r\n\r\nI believe the documentation for try_clone() should be extended to describe:\r\n\r\n- That this is an operation with the underlying operating system, dup() or WSADuplicateSocket() or whatever is appropriate (this would help address very similar issue 45536)\r\n- That the duplication operation also sets the close-on-exec flag.\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/392703912","html_url":"https://github.com/rust-lang/rust/issues/47946#issuecomment-392703912","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/47946","id":392703912,"user":{"login":"steveklabnik","id":27786,"avatar_url":"https://avatars2.githubusercontent.com/u/27786?v=4","gravatar_id":"","url":"https://api.github.com/users/steveklabnik","html_url":"https://github.com/steveklabnik","followers_url":"https://api.github.com/users/steveklabnik/followers","following_url":"https://api.github.com/users/steveklabnik/following{/other_user}","gists_url":"https://api.github.com/users/steveklabnik/gists{/gist_id}","starred_url":"https://api.github.com/users/steveklabnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveklabnik/subscriptions","organizations_url":"https://api.github.com/users/steveklabnik/orgs","repos_url":"https://api.github.com/users/steveklabnik/repos","events_url":"https://api.github.com/users/steveklabnik/events{/privacy}","received_events_url":"https://api.github.com/users/steveklabnik/received_events","type":"User","site_admin":false},"created_at":"2018-05-29T08:57:54Z","updated_at":"2018-05-29T08:57:54Z","author_association":"MEMBER","body":"@frewsxcv yup!"}}
{"actor":{"display_login":"steveklabnik"}}