-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Test #[unix_sigpipe = "inherit"]
with both SIG_DFL
and SIG_IGN
#123316
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Add a test that fails if `#[unix_sigpipe = "inherit"]` wrongly results in `SIGPIPE` being `SIG_DFL` if the parent has `SIG_IGN`. We have no current test for this particular case.
0e58cbd
to
4559e61
Compare
@TaKO8Ki I restructured the code in the hope that it would become more "obviously correct". |
@@ -1,14 +1,29 @@ | |||
//@ ignore-cross-compile because aux-bin does not yet support it |
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 open a GH issue for that if you think it'd be convenient to support this?
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.
Done with #124361
#[unix_sigpipe = "inherit"] | ||
extern crate libc; | ||
|
||
// By default the Rust runtime resets SIGPIPE to SIG_DFL before exec:ing child |
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.
As an aside: Regarding exec:ing
, I've never seen this typographic convention before (non-native speaker), I only know of using '
in such contexts.
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.
Indeed (I'm not a native speaker either):
$ git grep "'ing" | wc -l
24
I'll fix it in upcoming PRs in this area.
r? fmease @bors r+ rollup |
…r=fmease Test `#[unix_sigpipe = "inherit"]` with both `SIG_DFL` and `SIG_IGN` Extend our `#[unix_sigpipe = "inherit"]` test so that it detects if `SIGPIPE` wrongly ends up being `SIG_DFL` when the parent has `SIG_IGN`. We have no current test for this particular case. Tracking issue: rust-lang#97889
Rollup of 6 pull requests Successful merges: - rust-lang#122500 (delegation: Support renaming, and async, const, extern "ABI" and C-variadic functions) - rust-lang#123316 (Test `#[unix_sigpipe = "inherit"]` with both `SIG_DFL` and `SIG_IGN`) - rust-lang#124136 (Provide more context and suggestions in borrowck errors involving closures) - rust-lang#124280 (Port repr128-dwarf run-make test to rmake) - rust-lang#124282 (windows fill_utf16_buf: explain the expected return value) - rust-lang#124308 (Add diagnostic item for `std::iter::Enumerate`) r? `@ghost` `@rustbot` modify labels: rollup
…r=fmease Test `#[unix_sigpipe = "inherit"]` with both `SIG_DFL` and `SIG_IGN` Extend our `#[unix_sigpipe = "inherit"]` test so that it detects if `SIGPIPE` wrongly ends up being `SIG_DFL` when the parent has `SIG_IGN`. We have no current test for this particular case. Tracking issue: rust-lang#97889
Rollup of 5 pull requests Successful merges: - rust-lang#122500 (delegation: Support renaming, and async, const, extern "ABI" and C-variadic functions) - rust-lang#123316 (Test `#[unix_sigpipe = "inherit"]` with both `SIG_DFL` and `SIG_IGN`) - rust-lang#123794 (More DefineOpaqueTypes::Yes) - rust-lang#124282 (windows fill_utf16_buf: explain the expected return value) - rust-lang#124308 (Add diagnostic item for `std::iter::Enumerate`) Failed merges: - rust-lang#124136 (Provide more context and suggestions in borrowck errors involving closures) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 6 pull requests Successful merges: - rust-lang#123316 (Test `#[unix_sigpipe = "inherit"]` with both `SIG_DFL` and `SIG_IGN`) - rust-lang#123794 (More DefineOpaqueTypes::Yes) - rust-lang#123881 (Bump Fuchsia versions) - rust-lang#124281 (fix weak memory bug in TLS on Windows) - rust-lang#124282 (windows fill_utf16_buf: explain the expected return value) - rust-lang#124308 (Add diagnostic item for `std::iter::Enumerate`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 6 pull requests Successful merges: - rust-lang#123316 (Test `#[unix_sigpipe = "inherit"]` with both `SIG_DFL` and `SIG_IGN`) - rust-lang#123794 (More DefineOpaqueTypes::Yes) - rust-lang#123881 (Bump Fuchsia versions) - rust-lang#124281 (fix weak memory bug in TLS on Windows) - rust-lang#124282 (windows fill_utf16_buf: explain the expected return value) - rust-lang#124308 (Add diagnostic item for `std::iter::Enumerate`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#123316 - Enselic:sigpipe-inherit-variants, r=fmease Test `#[unix_sigpipe = "inherit"]` with both `SIG_DFL` and `SIG_IGN` Extend our `#[unix_sigpipe = "inherit"]` test so that it detects if `SIGPIPE` wrongly ends up being `SIG_DFL` when the parent has `SIG_IGN`. We have no current test for this particular case. Tracking issue: rust-lang#97889
Extend our
#[unix_sigpipe = "inherit"]
test so that it detects ifSIGPIPE
wrongly ends up beingSIG_DFL
when the parent hasSIG_IGN
. We have no current test for this particular case.Tracking issue: #97889