diff options
Diffstat (limited to 'library/std/src/net/tcp.rs')
| -rw-r--r-- | library/std/src/net/tcp.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/library/std/src/net/tcp.rs b/library/std/src/net/tcp.rs index 6a951426407..10685b49319 100644 --- a/library/std/src/net/tcp.rs +++ b/library/std/src/net/tcp.rs @@ -53,6 +53,12 @@ use crate::time::Duration; /// Ok(()) /// } // the stream is closed here /// ``` +/// +/// # Platform-specific Behavior +/// +/// On Unix, writes to the underlying socket in `SOCK_STREAM` mode are made with +/// `MSG_NOSIGNAL` flag. This suppresses the emission of the `SIGPIPE` signal when writing +/// to disconnected socket. In some cases, getting a `SIGPIPE` would trigger process termination. #[stable(feature = "rust1", since = "1.0.0")] pub struct TcpStream(net_imp::TcpStream); |
