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
This commit is contained in:
commit
c46f5784a6
@ -67,7 +67,7 @@ impl Command {
|
|||||||
// pipe I/O up to PIPE_BUF bytes should be atomic, and then
|
// 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 want to be sure we *don't* run at_exit destructors as
|
||||||
// we're being torn down regardless
|
// we're being torn down regardless
|
||||||
assert!(output.write(&bytes).is_ok());
|
rtassert!(output.write(&bytes).is_ok());
|
||||||
libc::_exit(1)
|
libc::_exit(1)
|
||||||
}
|
}
|
||||||
n => n,
|
n => n,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user