Skip to content

Commit 2013be1

Browse files
committed
ptrace: add PTRACE_O_EXITKILL option
It is a somewhat newer option -- it requires Linux 3.8.
1 parent 1b9d205 commit 2013be1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/sys/ptrace.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ libc_bitflags! {
116116
/// Stop tracee when a SECCOMP_RET_TRACE rule is triggered. See `man seccomp` for more
117117
/// details.
118118
PTRACE_O_TRACESECCOMP;
119+
/// Send a SIGKILL to the tracee if the tracer exits. This is useful
120+
/// for ptrace jailers to prevent tracees from escaping their control.
121+
#[cfg(any(target_os = "android", target_os = "linux"))]
122+
PTRACE_O_EXITKILL;
119123
}
120124
}
121125

0 commit comments

Comments
 (0)