summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2009-12-23 18:23:31 +0000
committerOthmar Gsenger <otti@anytun.org>2009-12-23 18:23:31 +0000
commit475caa7d9047497e38c3e2e305e510746ad36992 (patch)
treeaf288134f6e7df32a54f53a6a3e040d99bf15e36 /src
parentremoved useless patches directory (diff)
exit SignalController::handle if sigwait fails
Diffstat (limited to 'src')
-rw-r--r--src/signalController.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/signalController.cpp b/src/signalController.cpp
index 2e4a53e..b37e225 100644
--- a/src/signalController.cpp
+++ b/src/signalController.cpp
@@ -157,11 +157,13 @@ void SignalController::handle()
{
sigset_t signal_set;
int sigNum;
-
+ int err = 0;
while(1)
{
sigfillset(&signal_set);
- sigwait(&signal_set, &sigNum);
+ err = sigwait(&signal_set, &sigNum);
+ if (err)
+ break;
inject(sigNum);
}
}