Skip to content

Commit 6881624

Browse files
committed
use _exit for quitting the child process in test_wait.rs.
1 parent 334a8f0 commit 6881624

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/sys/test_wait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fn test_waitstatus_pid() {
4242
let _m = ::FORK_MTX.lock().expect("Mutex got poisoned by another test");
4343

4444
match fork().unwrap() {
45-
Child => {},
45+
Child => unsafe { _exit(0) },
4646
Parent { child } => {
4747
let status = waitpid(child, None).unwrap();
4848
assert_eq!(status.pid(), Some(child));

0 commit comments

Comments
 (0)