From 6a72fddf7b0fde9bc1ccce265016b1c2bf94ff3f Mon Sep 17 00:00:00 2001 From: Thulinma Date: Tue, 23 Jul 2013 14:28:35 +0200 Subject: [PATCH] Fixed edge case of interrupt handler for catching ended child processes. --- lib/procs.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/procs.cpp b/lib/procs.cpp index 5b61ea18..7afa1851 100644 --- a/lib/procs.cpp +++ b/lib/procs.cpp @@ -95,6 +95,10 @@ void Util::Procs::childsig_handler(int signum){ if (ret == 0){ //ignore, would block otherwise return; }else if (ret < 0){ + if (errno == EINTR){ + childsig_handler(signum); + return; + } #if DEBUG >= 3 std::cerr << "SIGCHLD received, but no child died"; #endif