diff options
Diffstat (limited to 'src/libmain/shared.cc')
-rw-r--r-- | src/libmain/shared.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index 14263446fe2e..47c38e33e67b 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -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()); } |