diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-12-12 14:05:23 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-12-12 14:05:23 +0100 |
commit | 5a2d45164899479cb3dfe94cb7659fd522163acc (patch) | |
tree | e7aa288d1b45e20ac01c47a67fa56df60d23466b /src/libmain/shared.cc | |
parent | 54616be64f84f0e64ecc288dc51d54b301d3e91e (diff) |
Don't abort if we get a signal while waiting for the pager
Diffstat (limited to 'src/libmain/shared.cc')
-rw-r--r-- | src/libmain/shared.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index 8d06455fa..7b50bfa9b 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -328,10 +328,14 @@ RunPager::RunPager() RunPager::~RunPager() { - if (pid != -1) { - std::cout.flush(); - close(STDOUT_FILENO); - pid.wait(true); + try { + if (pid != -1) { + std::cout.flush(); + close(STDOUT_FILENO); + pid.wait(true); + } + } catch (...) { + ignoreException(); } } |