Skip to content

Commit 5558214

Browse files
committed
ptrace: add PTRACE_O_EXITKILL option
It is a somewhat newer option -- it requires Linux 3.8. Is there a more precise way to specify that?
1 parent 9f4db8a commit 5558214

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(target_os = "linux")]
122+
PTRACE_O_EXITKILL;
119123
}
120124
}
121125

0 commit comments

Comments
 (0)