From 5a2d45164899479cb3dfe94cb7659fd522163acc Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 12 Dec 2014 14:05:23 +0100 Subject: [PATCH] Don't abort if we get a signal while waiting for the pager --- src/libmain/shared.cc | 12 ++++++++---- 1 file 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(); } }