Rollup merge of #150410 - crescentrose:document-socket-cloexec, r=ChrisDenton
Document default SOCK_CLOEXEC flag on new UnixStream Currently, the `std::os::unix::net::UnixStream` docs do not specify that the SOCK_CLOEXEC flag is set on new sockets. This commit adds a note clarifying that, in line with the note abuot the `MSG_NOSIGNAL` flag.
This commit is contained in:
commit
e2e271b7b0
1 changed files with 7 additions and 0 deletions
|
|
@ -58,6 +58,13 @@ use crate::time::Duration;
|
|||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// # `SOCK_CLOEXEC`
|
||||
///
|
||||
/// On platforms that support it, we pass the close-on-exec flag to atomically create the socket and
|
||||
/// set it as CLOEXEC. On Linux, this was added in 2.6.27. See [`socket(2)`] for more information.
|
||||
///
|
||||
/// [`socket(2)`]: https://www.man7.org/linux/man-pages/man2/socket.2.html#:~:text=SOCK_CLOEXEC
|
||||
///
|
||||
/// # `SIGPIPE`
|
||||
///
|
||||
/// Writes to the underlying socket in `SOCK_STREAM` mode are made with `MSG_NOSIGNAL` flag.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue