From 106c07892305591f9650cdca974eee7f7090b424 Mon Sep 17 00:00:00 2001 From: Anhad Singh Date: Wed, 17 Dec 2025 14:29:52 +1100 Subject: [PATCH] fix(bootstrap/procmgr): on child exit, do not set `stop_or_continue` when sending `SIGCHLD` Signed-off-by: Anhad Singh --- bootstrap/src/procmgr.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bootstrap/src/procmgr.rs b/bootstrap/src/procmgr.rs index 2de6e9973b..4b74a14aac 100644 --- a/bootstrap/src/procmgr.rs +++ b/bootstrap/src/procmgr.rs @@ -1720,7 +1720,7 @@ impl<'a> ProcScheme<'a> { SIGCHLD as u8, &mut false, KillMode::Idempotent, - true, // is_sigchld_to_parent + false, // stop_or_continue awoken, ) { log::error!("failed to send SIGCHLD to parent PID {ppid:?}: {err}"); @@ -1883,7 +1883,7 @@ impl<'a> ProcScheme<'a> { ) -> Result<()> { let mut killed_self = false; - let is_sigchld_to_parent = false; + let stop_or_continue = false; let caller_pid = thread.borrow().pid; // TODO(feat): allow this to be specified? @@ -1893,7 +1893,7 @@ impl<'a> ProcScheme<'a> { signal, &mut killed_self, KillMode::Idempotent, - is_sigchld_to_parent, + stop_or_continue, awoken, )?; @@ -1919,7 +1919,7 @@ impl<'a> ProcScheme<'a> { let mut killed_self = false; // SIGCHLD to parent are not generated by on_kill, but by on_send_sig itself - let is_sigchld_to_parent = false; + let stop_or_continue = false; let match_grp = match target { ProcKillTarget::SingleProc(pid) => { @@ -1929,7 +1929,7 @@ impl<'a> ProcScheme<'a> { signal, &mut killed_self, mode, - is_sigchld_to_parent, + stop_or_continue, awoken, )?; return if killed_self { @@ -1964,7 +1964,7 @@ impl<'a> ProcScheme<'a> { signal, &mut killed_self, mode, - is_sigchld_to_parent, + stop_or_continue, awoken, ); match res { @@ -2000,7 +2000,7 @@ impl<'a> ProcScheme<'a> { signal: u8, killed_self: &mut bool, mode: KillMode, - is_sigchld_to_parent: bool, + stop_or_continue: bool, awoken: &mut VecDeque, ) -> Result<()> { log::trace!("SEND_SIG(from {caller_pid:?}) TARGET {target:?} {signal} {mode:?}"); @@ -2211,7 +2211,7 @@ impl<'a> ProcScheme<'a> { // exit() will signal the parent, rather than immediately in kill() return SendResult::Succeeded; } - if !sig_pctl.signal_will_ign(sig, is_sigchld_to_parent) { + if !sig_pctl.signal_will_ign(sig, stop_or_continue) { match target { KillTarget::Thread(ref thread_rc) => { let thread = thread_rc.borrow(); @@ -2351,7 +2351,7 @@ impl<'a> ProcScheme<'a> { SIGCHLD as u8, killed_self, KillMode::Idempotent, - true, + true, // stop_or_continue awoken, ) { log::trace!("failed to SIGCHLD parent (SIGSTOP): {err}"); @@ -2383,7 +2383,7 @@ impl<'a> ProcScheme<'a> { SIGCHLD as u8, killed_self, KillMode::Idempotent, - true, + true, // stop_or_continue awoken, ) { log::trace!("failed to SIGCHLD parent (SIGCONT): {err}");