mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
Restore default SIGPIPE handler before invoking ‘man’
Fixes NixOS/nixpkgs#3410.
This commit is contained in:
parent
45f9a91e18
commit
50dc1f5b71
4 changed files with 17 additions and 15 deletions
|
@ -927,6 +927,16 @@ void closeOnExec(int fd)
|
|||
}
|
||||
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue