Skip to content

Commit

Permalink
kill: add comment explaining SIGEXIT rationale
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarrier committed Apr 24, 2024
1 parent 8cd8417 commit 72efad9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/uu/kill/src/kill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
} else {
15_usize //SIGTERM
};

let sig_name = signal_name_by_value(sig);
// Signal does not support converting from SIGEXIT/0
// Instead, nix::signal::kill expects Option::None to properly handle SIGEXIT
let sig: Option<Signal> = if sig_name.is_some_and(|name| name == "EXIT") {
None
} else {
Expand Down

0 comments on commit 72efad9

Please sign in to comment.