summaryrefslogtreecommitdiff
path: root/src/libfast/fast_dispatcher.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libfast/fast_dispatcher.c')
-rw-r--r--src/libfast/fast_dispatcher.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libfast/fast_dispatcher.c b/src/libfast/fast_dispatcher.c
index b4c6ce3a6..66a2ee514 100644
--- a/src/libfast/fast_dispatcher.c
+++ b/src/libfast/fast_dispatcher.c
@@ -21,6 +21,7 @@
#include <fcgiapp.h>
#include <signal.h>
#include <unistd.h>
+#include <errno.h>
#include <utils/debug.h>
#include <threading/thread.h>
@@ -389,7 +390,10 @@ METHOD(fast_dispatcher_t, waitsignal, void,
sigaddset(&set, SIGTERM);
sigaddset(&set, SIGHUP);
sigprocmask(SIG_BLOCK, &set, NULL);
- sigwaitinfo(&set, NULL);
+ while (sigwaitinfo(&set, NULL) == -1 && errno == EINTR)
+ {
+ /* wait for signal */
+ }
}
METHOD(fast_dispatcher_t, destroy, void,