-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kill: adding support for handling SIGEXIT #6269
Conversation
.try_into() | ||
.map_err(|e| std::io::Error::from_raw_os_error(e as i32))?; | ||
let sig_name = signal_name_by_value(sig); | ||
let sig: Option<Signal> = if sig_name.is_some_and(|name| name == "EXIT") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please add a comment, it isn't super obvious :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, very good point! Added.
GNU testsuite comparison:
|
tests/kill: test handling SIGEXIT kill: pass unqualified None for consistency
Rebased on main to attempt to fix CI and amend commit to follow best practices. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does exactly what it says on the tin, tests that the invocation works and will never regress. Great!
Adding support for handling
SIGEXIT
as mentioned in Issue-6628.Before this change the nix library would return an
EINVAL
when passingSIGEXIT
/EXIT
to uutils/coretutils kill.After this change nix passes
0
to libc kill as shown here.