about summary refs log tree commit diff
path: root/src/libstd/process.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-05-02 02:01:31 +0000
committerbors <bors@rust-lang.org>2019-05-02 02:01:31 +0000
commit767f59462663fbc55a69d39fc5e1f7f83b6fb37d (patch)
tree895cfb402b31011b55559d0acf4cdc5d34326eec /src/libstd/process.rs
parentea68bee369c9ebc0de35abcd39211fa0d4f9c84f (diff)
parent4ff12347d994d5c85cab250cedf223d9d0db8973 (diff)
downloadrust-767f59462663fbc55a69d39fc5e1f7f83b6fb37d.tar.gz
rust-767f59462663fbc55a69d39fc5e1f7f83b6fb37d.zip
Auto merge of #60460 - Centril:rollup-gz5bc8i, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #59634 (Added an explanation for the E0704 error.)
 - #60348 (move some functions from parser.rs to diagostics.rs)
 - #60385 (Emit metadata files earlier)
 - #60428 (Refactor `eval_body_using_ecx` so that it doesn't need to query for MIR)
 - #60437 (Ensure that drop order of `async fn` matches `fn` and that users cannot refer to generated arguments.)
 - #60439 (doc: Warn about possible zombie apocalypse)
 - #60452 (Remove Context and ContextKind)

Failed merges:

r? @ghost
Diffstat (limited to 'src/libstd/process.rs')
-rw-r--r--src/libstd/process.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstd/process.rs b/src/libstd/process.rs
index c1addb46a0a..6e4c6e4c366 100644
--- a/src/libstd/process.rs
+++ b/src/libstd/process.rs
@@ -134,6 +134,18 @@ use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
 /// the parent process wait until the child has actually exited before
 /// continuing.
 ///
+/// # Warning
+///
+/// On some system, calling [`wait`] or similar is necessary for the OS to
+/// release resources. A process that terminated but has not been waited on is
+/// still around as a "zombie". Leaving too many zombies around may exhaust
+/// global resources (for example process IDs).
+///
+/// The standard library does *not* automatically wait on child processes (not
+/// even if the `Child` is dropped), it is up to the application developer to do
+/// so. As a consequence, dropping `Child` handles without waiting on them first
+/// is not recommended in long-running applications.
+///
 /// # Examples
 ///
 /// ```should_panic