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 18316fc commit eaea656Copy full SHA for eaea656
src/shims/trace/child.rs
@@ -220,6 +220,10 @@ pub unsafe fn init_sv() -> Result<(), SvInitError> {
220
}
221
222
unistd::ForkResult::Child => {
223
+ // Make sure we never get orphaned and stuck in SIGSTOP or similar
224
+ // SAFETY: prctl PR_SET_PDEATHSIG is always safe to call
225
+ let ret = libc::prctl(libc::PR_SET_PDEATHSIG, libc::SIGTERM);
226
+ assert_ne!(ret, 0);
227
// First make sure the parent succeeded with ptracing us!
228
signal::raise(signal::SIGSTOP).unwrap();
229
// If we're the child process, save the supervisor info
0 commit comments