Skip to content

Commit 4c70200

Browse files
authored
Rollup merge of #88805 - krhancoc:master, r=dtolnay
Clarification of default socket flags This PR outlines the decision to disable inheritance of socket objects when possible to child processes in the documentation.
2 parents 40d3040 + a10f095 commit 4c70200

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: library/std/src/net/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
//! * [`ToSocketAddrs`] is a trait that used for generic address resolution when interacting
1515
//! with networking objects like [`TcpListener`], [`TcpStream`] or [`UdpSocket`]
1616
//! * Other types are return or parameter types for various methods in this module
17+
//!
18+
//! Rust disables inheritance of socket objects to child processes by default when possible. For
19+
//! example, through the use of the `CLOEXEC` flag in UNIX systems or the `HANDLE_FLAG_INHERIT`
20+
//! flag on Windows.
1721
1822
#![stable(feature = "rust1", since = "1.0.0")]
1923

0 commit comments

Comments
 (0)