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:
Jonas Schievink 2020-09-30 20:56:15 +02:00 committed by GitHub
commit c46f5784a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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,