1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Restore default SIGPIPE handler before invoking ‘man’

Fixes NixOS/nixpkgs#3410.
This commit is contained in:
Eelco Dolstra 2014-07-31 10:31:17 +02:00
parent 45f9a91e18
commit 50dc1f5b71
4 changed files with 17 additions and 15 deletions

View file

@ -413,18 +413,6 @@ const char * * strings2CharPtrs(const Strings & ss)
}
/* Restore default handling of SIGPIPE, otherwise some programs will
randomly say "Broken pipe". */
static void restoreSIGPIPE()
{
struct sigaction act, oact;
act.sa_handler = SIG_DFL;
act.sa_flags = 0;
sigemptyset(&act.sa_mask);
if (sigaction(SIGPIPE, &act, &oact)) throw SysError("resetting SIGPIPE");
}
//////////////////////////////////////////////////////////////////////