fix(bootstrap/procmgr): on child exit, do not set stop_or_continue
when sending `SIGCHLD` Signed-off-by: Anhad Singh <andypython@protonmail.com>
This commit is contained in:
+10
-10
@@ -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<VirtualId>,
|
||||
) -> 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}");
|
||||
|
||||
Reference in New Issue
Block a user