timeout: return timed-out status after kill grace period (#11392)

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
This commit is contained in:
Can Bölük
2026-04-03 11:06:43 +02:00
committed by GitHub
parent dfc08b2115
commit dd2bcea76d
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -296,7 +296,7 @@ fn wait_or_kill_process(
});
Ok(exit_code)
} else {
Ok(ExitStatus::TimeoutFailed.into())
Ok(ExitStatus::CommandTimedOut.into())
}
}
Ok(None) => {
+7
View File
@@ -104,6 +104,13 @@ fn test_preserve_status() {
}
}
#[test]
fn test_kill_after_preserves_timeout_exit_without_preserve_status() {
new_ucmd!()
.args(&["-k", "1", "1", "sleep", "10"])
.fails_with_code(124)
.no_output();
}
#[test]
fn test_preserve_status_even_when_send_signal() {
// When sending CONT signal, process doesn't get killed or stopped.