Module rustc_session::config::sigpipe

source ·
Expand description

NOTE: Keep these constants in sync with library/std/src/sys/pal/unix/!


  • The default value if -Zon-broken-pipe=... is not specified. This resolves to SIG_IGN in library/std/src/sys/pal/unix/
  • Do not touch SIGPIPE. Use whatever the parent process uses.
  • Change SIGPIPE to SIG_DFL so that the process is killed when trying to write to a closed pipe. This is usually the desired behavior for CLI apps that produce textual output that you want to pipe to other programs such as head -n 1.
  • Change SIGPIPE to SIG_IGN so that failed writes results in EPIPE that are eventually converted to ErrorKind::BrokenPipe.