about summary refs log tree commit diff
path: root/src/libmain
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-12-12T13·05+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-12-12T13·05+0100
commit5a2d45164899479cb3dfe94cb7659fd522163acc (patch)
treee7aa288d1b45e20ac01c47a67fa56df60d23466b /src/libmain
parent54616be64f84f0e64ecc288dc51d54b301d3e91e (diff)
Don't abort if we get a signal while waiting for the pager
Diffstat (limited to 'src/libmain')
-rw-r--r--src/libmain/shared.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 8d06455fa739..7b50bfa9bb32 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();
     }
 }