File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,12 @@ use crate::time::Duration;
53
53
/// Ok(())
54
54
/// } // the stream is closed here
55
55
/// ```
56
+ ///
57
+ /// # SIGPIPE
58
+ ///
59
+ /// Writes to the underlying socket in `SOCK_STREAM` mode are made with `MSG_NOSIGNAL` flag.
60
+ /// This suppresses the emission of the `SIGPIPE` signal when writing to disconnected socket.
61
+ /// In some cases getting a `SIGPIPE` would trigger process termination.
56
62
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
57
63
pub struct TcpStream ( net_imp:: TcpStream ) ;
58
64
Original file line number Diff line number Diff line change @@ -62,6 +62,12 @@ use crate::time::Duration;
62
62
/// Ok(())
63
63
/// }
64
64
/// ```
65
+ ///
66
+ /// # SIGPIPE
67
+ ///
68
+ /// Writes to the underlying socket in `SOCK_STREAM` mode are made with `MSG_NOSIGNAL` flag.
69
+ /// This suppresses the emission of the `SIGPIPE` signal when writing to disconnected socket.
70
+ /// In some cases getting a `SIGPIPE` would trigger process termination.
65
71
#[ stable( feature = "unix_socket" , since = "1.10.0" ) ]
66
72
pub struct UnixStream ( pub ( super ) Socket ) ;
67
73
You can’t perform that action at this time.
0 commit comments