fn propagate_exit()

in reverie-process/src/exit_status.rs [260:276]


    fn propagate_exit() {
        // NOTE: These tests fail under a sanitized build. ASAN leak detection
        // must be disabled for this to run correctly. To disable ASAN leak
        // detection, set the `ASAN_OPTIONS=detect_leaks=0` environment variable
        // *before* the test starts up. (This is currently done in the TARGETS
        // file.) Alternatively, we *could* bypass the atexit handler that ASAN
        // sets up by calling `libc::_exit`, but that may have unintended
        // consequences for real code.
        assert_eq!(
            run_forked(|| { ExitStatus::Exited(0).raise_or_exit() }),
            Ok(ExitStatus::Exited(0))
        );
        assert_eq!(
            run_forked(|| { ExitStatus::Exited(42).raise_or_exit() }),
            Ok(ExitStatus::Exited(42))
        );
    }