summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2017-07-22 18:07:08 +0200
committerMarcin Mielniczuk <marmistrz.dev@zoho.eu>2017-07-25 09:09:52 +0200
commit536787e37d86f692b915ab1aa62c6ad793531eba (patch)
tree7c669f558b62b9b7b23d7b848ba6559dae60fb41
parent4cefd538497e4dc8cfa51bad286541e2336b774c (diff)
downloadnix-536787e37d86f692b915ab1aa62c6ad793531eba.zip
Replace remaining process::exit with libc::_exit
Note that ptrace isn't documented as signal-safe, but it's supposed to just be a light syscall wrapper, so it should be fine.
-rw-r--r--test/sys/test_wait.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/sys/test_wait.rs b/test/sys/test_wait.rs
index e1d3464b..210e6bc8 100644
--- a/test/sys/test_wait.rs
+++ b/test/sys/test_wait.rs
@@ -48,13 +48,14 @@ mod ptrace {
use nix::unistd::*;
use nix::unistd::ForkResult::*;
use std::{ptr, process};
+ use libc::_exit;
fn ptrace_child() -> ! {
let _ = ptrace(PTRACE_TRACEME, Pid::from_raw(0), ptr::null_mut(), ptr::null_mut());
// As recommended by ptrace(2), raise SIGTRAP to pause the child
// until the parent is ready to continue
let _ = raise(SIGTRAP);
- process::exit(0)
+ unsafe { _exit(0) }
}
fn ptrace_parent(child: Pid) {