diff options
| author | hyd-dev <yd-huang@outlook.com> | 2020-09-29 15:16:46 +0800 |
|---|---|---|
| committer | hyd-dev <yd-huang@outlook.com> | 2020-09-29 15:16:46 +0800 |
| commit | a2526b416fb4ca7874fa41a3eb595f456703d486 (patch) | |
| tree | bf97cd51174db794e61e53d5c99b5fb8dfb65b66 /library/std/src/sys/unix/process/process_unix.rs | |
| parent | 1d5a865b2f671189af8d7af6b2d8f3dfa2a6d425 (diff) | |
| download | rust-a2526b416fb4ca7874fa41a3eb595f456703d486.tar.gz rust-a2526b416fb4ca7874fa41a3eb595f456703d486.zip | |
Use `rtassert!` instead of `assert!` from the child process after fork() in std::sys::unix::process::Command::spawn()
`assert!` panics on failure, which is not signal-safe.
Diffstat (limited to 'library/std/src/sys/unix/process/process_unix.rs')
| -rw-r--r-- | library/std/src/sys/unix/process/process_unix.rs | 2 |
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, |
