diff options
| author | Martin Nordholts <enselic@gmail.com> | 2022-07-05 19:56:22 +0200 |
|---|---|---|
| committer | Martin Nordholts <enselic@gmail.com> | 2022-08-28 19:46:45 +0200 |
| commit | ddee45e1d7fd34563c13513d974f792fae41a2f7 (patch) | |
| tree | 680a1cbbe412897e2a0acae57e93d6ffe09a07cd /library/std/src/sys/solid | |
| parent | ee285eab69d515114ed54a8e6c25e359acd6b684 (diff) | |
| download | rust-ddee45e1d7fd34563c13513d974f792fae41a2f7.tar.gz rust-ddee45e1d7fd34563c13513d974f792fae41a2f7.zip | |
Support `#[unix_sigpipe = "inherit|sig_dfl|sig_ign"]` on `fn main()`
This makes it possible to instruct libstd to never touch the signal handler for `SIGPIPE`, which makes programs pipeable by default (e.g. with `./your-program | head -n 1`) without `ErrorKind::BrokenPipe` errors.
Diffstat (limited to 'library/std/src/sys/solid')
| -rw-r--r-- | library/std/src/sys/solid/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/solid/mod.rs b/library/std/src/sys/solid/mod.rs index 778a589d1b7..5867979a2a7 100644 --- a/library/std/src/sys/solid/mod.rs +++ b/library/std/src/sys/solid/mod.rs @@ -56,7 +56,7 @@ pub mod locks { // SAFETY: must be called only once during runtime initialization. // NOTE: this is not guaranteed to run, for example when Rust code is called externally. -pub unsafe fn init(_argc: isize, _argv: *const *const u8) {} +pub unsafe fn init(_argc: isize, _argv: *const *const u8, _sigpipe: u8) {} // SAFETY: must be called only once during runtime cleanup. pub unsafe fn cleanup() {} |
