mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
timeout: return timed-out status after kill grace period (#11392)
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
This commit is contained in:
@@ -296,7 +296,7 @@ fn wait_or_kill_process(
|
||||
});
|
||||
Ok(exit_code)
|
||||
} else {
|
||||
Ok(ExitStatus::TimeoutFailed.into())
|
||||
Ok(ExitStatus::CommandTimedOut.into())
|
||||
}
|
||||
}
|
||||
Ok(None) => {
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user