DRAFT: Use a noop SIGPIPE handler instead of SIG_IGN#121578
DRAFT: Use a noop SIGPIPE handler instead of SIG_IGN#121578Enselic wants to merge 2 commits intorust-lang:masterfrom
SIGPIPE handler instead of SIG_IGN#121578Conversation
|
r? @ChrisDenton rustbot has assigned @ChrisDenton. Use r? to explicitly pick a reviewer |
SIGPIPE handler instead of SIG_IGNSIGPIPE 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.
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:
SIGPIPEis ignored?The
oldactreturn 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_DFLif 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.