about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2020-09-30 20:56:15 +0200
committerGitHub <noreply@github.com>2020-09-30 20:56:15 +0200
commitc46f5784a68dbddf360b5e0d504ca77b359e1742 (patch)
treea7cff56d10123b5fb34bdadba1fbe0aa30d66899 /library/std/src
parentb85081d46ac2cbfa6862487024fa3323ef95a0e3 (diff)
parenta2526b416fb4ca7874fa41a3eb595f456703d486 (diff)
downloadrust-c46f5784a68dbddf360b5e0d504ca77b359e1742.tar.gz
rust-c46f5784a68dbddf360b5e0d504ca77b359e1742.zip
Rollup merge of #77328 - hyd-dev:assert-to-rtassert, r=Amanieu
Use `rtassert!` instead of `assert!` from the child process after fork() in std::sys::unix::process::Command::spawn()

As discussed in #73894, `assert!` panics on failure, which is not signal-safe, and `rtassert!` is a suitable replacement.

Fixes #73894.

r? @Amanieu @cuviper @joshtriplett
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/sys/unix/process/process_unix.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/unix/process/process_unix.rs b/library/std/src/sys/unix/process/process_unix.rs
index 08efe154e4c..c3625d306ab 100644
--- a/library/std/src/sys/unix/process/process_unix.rs
+++ b/library/std/src/sys/unix/process/process_unix.rs
@@ -67,7 +67,7 @@ impl Command {
                     // pipe I/O up to PIPE_BUF bytes should be atomic, and then
                     // we want to be sure we *don't* run at_exit destructors as
                     // we're being torn down regardless
-                    assert!(output.write(&bytes).is_ok());
+                    rtassert!(output.write(&bytes).is_ok());
                     libc::_exit(1)
                 }
                 n => n,