-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
native: Ignore SIGPIPE by default #13158
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some unix platforms will send a SIGPIPE signal instead of returning EPIPE from a syscall by default. The native runtime doesn't install a SIGPIPE handler, causing the program to die immediately in this case. This brings the behavior in line with libgreen by ignoring SIGPIPE and propagating EPIPE upwards to the application in the form of an IoError. Closes rust-lang#13123
bors
added a commit
that referenced
this pull request
Mar 28, 2014
Some unix platforms will send a SIGPIPE signal instead of returning EPIPE from a syscall by default. The native runtime doesn't install a SIGPIPE handler, causing the program to die immediately in this case. This brings the behavior in line with libgreen by ignoring SIGPIPE and propagating EPIPE upwards to the application in the form of an IoError. Closes #13123
lifupan
pushed a commit
to lifupan/kata-containers
that referenced
this pull request
May 28, 2021
The Rust standard library had suppressed the default SIGPIPE behavior, see rust-lang/rust#13158. Since the parent's signal handler would be inherited by it's child process, thus we should re-enable the standard SIGPIPE behavior as a workaround. Fixes: kata-containers#1887 Signed-off-by: fupan.lfp <fupan.lfp@antgroup.com>
fidencio
pushed a commit
to fidencio/kata-containers
that referenced
this pull request
May 31, 2021
The Rust standard library had suppressed the default SIGPIPE behavior, see rust-lang/rust#13158. Since the parent's signal handler would be inherited by it's child process, thus we should re-enable the standard SIGPIPE behavior as a workaround. Fixes: kata-containers#1887 Signed-off-by: fupan.lfp <fupan.lfp@antgroup.com> (cherry picked from commit 0ae364c) Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
fidencio
pushed a commit
to fidencio/kata-containers
that referenced
this pull request
May 31, 2021
The Rust standard library had suppressed the default SIGPIPE behavior, see rust-lang/rust#13158. Since the parent's signal handler would be inherited by it's child process, thus we should re-enable the standard SIGPIPE behavior as a workaround. Fixes: kata-containers#1887 Signed-off-by: fupan.lfp <fupan.lfp@antgroup.com> (cherry picked from commit 0ae364c) Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
mingnus
added a commit
to mingnus/thin-provisioning-tools
that referenced
this pull request
May 20, 2022
Separate output errors from input errors for callers to determine the error type. A broken pipe error (EPIPE) is also treated as an output error since the Rust std library ignores SIGPIPE by default [1][2]. thin_dump then shows the hint if there's any error in metadata, or exit gracefully if it is an output error. [1] rust-lang/rust#13158 [2] rust-lang/rust#62569
mingnus
added a commit
to mingnus/thin-provisioning-tools
that referenced
this pull request
May 24, 2022
Separate output errors from input errors for callers to determine the error type. A broken pipe error (EPIPE) is also treated as an output error since the Rust std library ignores SIGPIPE by default [1][2]. thin_dump then displays the hint if there's any error in metadata, or exit gracefully if it is an output error. [1] rust-lang/rust#13158 [2] rust-lang/rust#62569
mingnus
added a commit
to mingnus/thin-provisioning-tools
that referenced
this pull request
May 25, 2022
thin_dump should display the reparing hint only if there's any error in the input metadata rather than the output process. A context therefore is added to the returned error for callers to determine the error type. Note that a broken pipe error (EPIPE) is treated as an output error since the Rust std library ignores SIGPIPE by default [1][2]. [1] rust-lang/rust#13158 [2] rust-lang/rust#62569
mingnus
added a commit
to mingnus/thin-provisioning-tools
that referenced
this pull request
May 27, 2022
thin_dump should display the reparing hint only if there's any error in the input metadata rather than the output process. A context therefore is added to the returned error for callers to determine the error type. Note that a broken pipe error (EPIPE) is treated as an output error since the Rust std library ignores SIGPIPE by default [1][2]. [1] rust-lang/rust#13158 [2] rust-lang/rust#62569
mingnus
added a commit
to mingnus/thin-provisioning-tools
that referenced
this pull request
May 27, 2022
thin_dump should display the repairing hint if there's any error in the input metadata rather than the output process. A context object thus is added to the returned error for callers to determine the error type. Note that a broken pipe error (EPIPE) is treated as an output error since the Rust std library ignores SIGPIPE by default [1][2]. [1] rust-lang/rust#13158 [2] rust-lang/rust#62569
mingnus
added a commit
to mingnus/thin-provisioning-tools
that referenced
this pull request
May 27, 2022
thin_dump should display the repairing hint if there's any error in the input metadata rather than the output process. A context object thus is added to the returned error for callers to determine the error type. Note that a broken pipe error (EPIPE) is treated as an output error since the Rust std library ignores SIGPIPE by default [1][2]. [1] rust-lang/rust#13158 [2] rust-lang/rust#62569
mingnus
added a commit
to mingnus/thin-provisioning-tools
that referenced
this pull request
May 27, 2022
thin_dump should display the repairing hint if there's any error in the input metadata rather than the output process. A context object thus is added to the returned error for callers to identify the error type. Note that a broken pipe error (EPIPE) is returned as an output error since the Rust std library ignores SIGPIPE by default [1][2]. However, due to the dump process leverages NodeVisitor, the caller is not able to obtain the low-level IoError object from a string-represented BTreeError. [1] rust-lang/rust#13158 [2] rust-lang/rust#62569
mingnus
added a commit
to mingnus/thin-provisioning-tools
that referenced
this pull request
May 27, 2022
thin_dump should display the repairing hint if there's any error in the input metadata rather than the output process. A context object thus is added to the returned error for callers to identify the error type. Note that a broken pipe error (EPIPE) is returned as an output error since the Rust std library ignores SIGPIPE by default [1][2]. However, due to the dump process leverages NodeVisitor, a low-level output error is stringified into a BTreeError, and thus the caller cannot tell whether it's broken pipe or not. [1] rust-lang/rust#13158 [2] rust-lang/rust#62569
matthiaskrgr
pushed a commit
to matthiaskrgr/rust
that referenced
this pull request
Sep 13, 2022
…nas-schievink feat: make clicking a closing brace inlay hint go to the opening brace
dingxiangfei2009
pushed a commit
to dingxiangfei2009/rust
that referenced
this pull request
Jul 28, 2024
…=Manishearth Make `std_instead_of_core` somewhat MSRV aware For rust-lang#13158, this catches some things e.g. `core::net` and the recently stable `core::error` but not things moved individually like `UnwindSafe`, as far as I can see the version for those isn't easily available Beta nominating since ideally we'd get this change in the same version as `core::error` becomes stable cc `@kpreid` changelog: none
Jarcho
pushed a commit
to Jarcho/rust
that referenced
this pull request
Aug 26, 2024
…=Manishearth Make `std_instead_of_core` somewhat MSRV aware For rust-lang#13158, this catches some things e.g. `core::net` and the recently stable `core::error` but not things moved individually like `UnwindSafe`, as far as I can see the version for those isn't easily available Beta nominating since ideally we'd get this change in the same version as `core::error` becomes stable cc `@kpreid` changelog: none
Jarcho
pushed a commit
to Jarcho/rust
that referenced
this pull request
Aug 26, 2024
…=Manishearth Make `std_instead_of_core` somewhat MSRV aware For rust-lang#13158, this catches some things e.g. `core::net` and the recently stable `core::error` but not things moved individually like `UnwindSafe`, as far as I can see the version for those isn't easily available Beta nominating since ideally we'd get this change in the same version as `core::error` becomes stable cc `@kpreid` changelog: none
MabezDev
pushed a commit
to esp-rs/rust
that referenced
this pull request
Sep 3, 2024
…=Manishearth Make `std_instead_of_core` somewhat MSRV aware For rust-lang#13158, this catches some things e.g. `core::net` and the recently stable `core::error` but not things moved individually like `UnwindSafe`, as far as I can see the version for those isn't easily available Beta nominating since ideally we'd get this change in the same version as `core::error` becomes stable cc `@kpreid` changelog: none
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some unix platforms will send a SIGPIPE signal instead of returning EPIPE from a
syscall by default. The native runtime doesn't install a SIGPIPE handler,
causing the program to die immediately in this case. This brings the behavior in
line with libgreen by ignoring SIGPIPE and propagating EPIPE upwards to the
application in the form of an IoError.
Closes #13123