mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 06:43:20 +03:00
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:
@@ -58,6 +58,13 @@
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// # `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.
|
||||
|
||||
Reference in New Issue
Block a user