1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

kill: don't show EXIT with --list

This commit is contained in:
Daniel Hofstetter 2024-04-13 16:40:30 +02:00 committed by Ben Wiederhake
parent d56c7bbaee
commit aaaf4c3f91
2 changed files with 4 additions and 2 deletions

View file

@ -162,7 +162,8 @@ fn print_signal(signal_name_or_value: &str) -> UResult<()> {
}
fn print_signals() {
for signal in ALL_SIGNALS.iter() {
// GNU kill doesn't list the EXIT signal with --list, so we ignore it, too
for signal in ALL_SIGNALS.iter().filter(|x| **x != "EXIT") {
println!("{signal}");
}
}

View file

@ -62,7 +62,8 @@ fn test_kill_list_all_signals() {
.succeeds()
.stdout_contains("KILL")
.stdout_contains("TERM")
.stdout_contains("HUP");
.stdout_contains("HUP")
.stdout_does_not_contain("EXIT");
}
#[test]