1
Fork 0

panic ui test: Provide comprehensive test for panic after fork

This tests that we can indeed safely panic after fork, both
a raw libc::fork and in a Command pre_exec hook.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
This commit is contained in:
Ian Jackson 2021-02-07 12:16:11 +00:00
parent f8015061c8
commit a17eab7bed
3 changed files with 178 additions and 21 deletions

View file

@ -2,6 +2,9 @@ use crate::os::unix::process::{CommandExt, ExitStatusExt};
use crate::panic::catch_unwind;
use crate::process::Command;
// Many of the other aspects of this situation, including heap alloc concurrency
// safety etc., are tested in src/test/ui/process/process-panic-after-fork.rs
#[test]
fn exitstatus_display_tests() {
// In practice this is the same on every Unix.