mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +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
|
@ -244,9 +244,9 @@ static void initAndRun(int argc, char * * argv)
|
|||
|
||||
void showManPage(const string & name)
|
||||
{
|
||||
string cmd = "man " + name;
|
||||
if (system(cmd.c_str()) != 0)
|
||||
throw Error(format("command `%1%' failed") % cmd);
|
||||
restoreSIGPIPE();
|
||||
execlp("man", "man", name.c_str(), NULL);
|
||||
throw SysError(format("command `man %1%' failed") % name.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue