We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed60a7f commit 5171739Copy full SHA for 5171739
src/shims/trace/child.rs
@@ -211,6 +211,10 @@ pub unsafe fn init_sv() -> Result<(), SvInitError> {
211
}
212
213
unistd::ForkResult::Child => {
214
+ // Make sure we never get orphaned and stuck in SIGSTOP or similar
215
+ // SAFETY: prctl PR_SET_PDEATHSIG is always safe to call
216
+ let ret = libc::prctl(libc::PR_SET_PDEATHSIG, libc::SIGTERM);
217
+ assert_eq!(ret, 0);
218
// First make sure the parent succeeded with ptracing us!
219
signal::raise(signal::SIGSTOP).unwrap();
220
// If we're the child process, save the supervisor info
0 commit comments