Skip to content

Commit

Permalink
kill: don't show EXIT with --list
Browse files Browse the repository at this point in the history
  • Loading branch information
cakebaker authored and BenWiederhake committed Apr 14, 2024
1 parent d56c7bb commit aaaf4c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/uu/kill/src/kill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}");
}
}
Expand Down
3 changes: 2 additions & 1 deletion tests/by-util/test_kill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit aaaf4c3

Please sign in to comment.