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.
This commit is contained in:
parent
ee285eab69
commit
ddee45e1d7
46 changed files with 449 additions and 43 deletions
|
@ -1315,7 +1315,7 @@ impl<'v> RootCollector<'_, 'v> {
|
|||
/// the return type of `main`. This is not needed when
|
||||
/// the user writes their own `start` manually.
|
||||
fn push_extra_entry_roots(&mut self) {
|
||||
let Some((main_def_id, EntryFnType::Main)) = self.entry_fn else {
|
||||
let Some((main_def_id, EntryFnType::Main { .. })) = self.entry_fn else {
|
||||
return;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue