Skip to content

Commit c46f578

Browse files
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
2 parents b85081d + a2526b4 commit c46f578

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/sys/unix/process/process_unix.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl Command {
6767
// pipe I/O up to PIPE_BUF bytes should be atomic, and then
6868
// we want to be sure we *don't* run at_exit destructors as
6969
// we're being torn down regardless
70-
assert!(output.write(&bytes).is_ok());
70+
rtassert!(output.write(&bytes).is_ok());
7171
libc::_exit(1)
7272
}
7373
n => n,

0 commit comments

Comments
 (0)