Kill the child processes at once on a second interrupt during the grace period

This commit is contained in:
2026-11-04 02:50:35 +01:00
parent 5389ac97ac
commit 599d86ccbf
4 changed files with 61 additions and 5 deletions
+1 -1
View File
@@ -114,6 +114,6 @@ pub fn run(config: SandboxConfig) -> Result<ExitStatus, SandboxError> {
// bwrap ignores them: its death would SIGKILL the entrypoint through --die-with-parent.
let bwrap_process = bwrap.spawn(signal_forwarder.ignore_forwarded_signals())?;
let status = signal_forwarder.forward_until_exit(&bwrap_process)?;
process_tree::terminate_and_reap_all(CLEANUP_GRACE_PERIOD)?;
process_tree::terminate_and_reap_all(CLEANUP_GRACE_PERIOD, signals::has_pending_interrupt)?;
Ok(status)
}