-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
DRAFT: Use a noop SIGPIPE
handler instead of SIG_IGN
#121578
Conversation
r? @ChrisDenton rustbot has assigned @ChrisDenton. Use r? to explicitly pick a reviewer |
SIGPIPE
handler instead of SIG_IGN
SIGPIPE
handler instead of SIG_IGN
The job Click to see the possible cause of the failure (guessed by this bot)
|
target_os = "fuchsia", | ||
target_os = "horizon", | ||
)))] | ||
extern "C" fn _rustc_sigaction_noop(_: libc::c_int) {} |
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.
Maybe put this next to the sa_sigaction
assignment?
☔ The latest upstream changes (presumably #121627) made this pull request unmergeable. Please resolve the merge conflicts. |
…ark-Simulacrum unix_sigpipe: Add test for SIGPIPE disposition in child processes To make it clearer what the impact would be to stop using `SIG_IGN` and instead use a noop handler, like suggested [here](rust-lang#62569 (comment)) and implemented [here](rust-lang#121578). Part of rust-lang#97889
…ark-Simulacrum unix_sigpipe: Add test for SIGPIPE disposition in child processes To make it clearer what the impact would be to stop using `SIG_IGN` and instead use a noop handler, like suggested [here](rust-lang#62569 (comment)) and implemented [here](rust-lang#121578). Part of rust-lang#97889
…ark-Simulacrum unix_sigpipe: Add test for SIGPIPE disposition in child processes To make it clearer what the impact would be to stop using `SIG_IGN` and instead use a noop handler, like suggested [here](rust-lang#62569 (comment)) and implemented [here](rust-lang#121578). Part of rust-lang#97889
…ark-Simulacrum unix_sigpipe: Add test for SIGPIPE disposition in child processes To make it clearer what the impact would be to stop using `SIG_IGN` and instead use a noop handler, like suggested [here](rust-lang#62569 (comment)) and implemented [here](rust-lang#121578). Part of rust-lang#97889
Rollup merge of rust-lang#121573 - Enselic:sigpipe-child-process, r=Mark-Simulacrum unix_sigpipe: Add test for SIGPIPE disposition in child processes To make it clearer what the impact would be to stop using `SIG_IGN` and instead use a noop handler, like suggested [here](rust-lang#62569 (comment)) and implemented [here](rust-lang#121578). Part of rust-lang#97889
I will close this for now as this is not something we will merge in the near future. I have an updated local branch that I probably will resume work on at a later point. |
Here is an implementation of the proposal to use a noop handler instead of SIG_IGN.
Note that I have based this PR on #121573 which is not merged yet.
I have two questions:
SIGPIPE
is ignored?The
oldact
return value ofsigaction()
will now point to a hidden function that will be tricky to interpret by others instead of a well-known handler constant.SIG_DFL
if the Rust runtime has set it toSIG_IGN
?Personally I currently think the answer is "yes", but in the current implementation, the answer is explicitly and by design "no". I have added this as an open unresolved question for
#[unix_sigpipe = "sig_ign"]
to the tracking issue.