about summary refs log tree commit diff
path: root/library/std/src/net/mod.rs
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-03-04 02:06:37 +0100
committerGitHub <noreply@github.com>2022-03-04 02:06:37 +0100
commit4c7020047605dcabe5d0611bb5b575e8344fe515 (patch)
treec7fec3587ff7acb72e9f32b450522a1069c06be3 /library/std/src/net/mod.rs
parent40d3040ae19b8c43c0027bc6d3e9805e5ee5e0ee (diff)
parenta10f0954c0edb478a8efd4ac000b2abd3cf06ff5 (diff)
downloadrust-4c7020047605dcabe5d0611bb5b575e8344fe515.tar.gz
rust-4c7020047605dcabe5d0611bb5b575e8344fe515.zip
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.
Diffstat (limited to 'library/std/src/net/mod.rs')
-rw-r--r--library/std/src/net/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/std/src/net/mod.rs b/library/std/src/net/mod.rs
index f676e0a04f0..9ed4a98f943 100644
--- a/library/std/src/net/mod.rs
+++ b/library/std/src/net/mod.rs
@@ -14,6 +14,10 @@
 //! * [`ToSocketAddrs`] is a trait that used for generic address resolution when interacting
 //!   with networking objects like [`TcpListener`], [`TcpStream`] or [`UdpSocket`]
 //! * Other types are return or parameter types for various methods in this module
+//!
+//! Rust disables inheritance of socket objects to child processes by default when possible.  For
+//! example, through the use of the `CLOEXEC` flag in UNIX systems or the `HANDLE_FLAG_INHERIT`
+//! flag on Windows.
 
 #![stable(feature = "rust1", since = "1.0.0")]