diff options
author | Othmar Gsenger <otti@anytun.org> | 2009-12-23 18:48:59 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2009-12-23 18:48:59 +0000 |
commit | 34189cfc48125db7bdcd1758301ecb602a6c33c6 (patch) | |
tree | d820530cb0d872e206a08b90f22ba8fc8a3de357 /src | |
parent | fixed spelling error (diff) |
do not end signalcontroller on EINTR
and write a message to log otherwise
Diffstat (limited to 'src')
-rw-r--r-- | src/signalController.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/signalController.cpp b/src/signalController.cpp index f298e72..00b9bd2 100644 --- a/src/signalController.cpp +++ b/src/signalController.cpp @@ -163,8 +163,15 @@ void SignalController::handle() sigfillset(&signal_set); err = sigwait(&signal_set, &sigNum); if (err) - break; - inject(sigNum); + { + if (err != EINTR && errno != EINTR ) + { + cLog.msg(Log::PRIO_ERROR) << "sigwait failed with error: \"" << AnytunErrno(errno) << "\" SignalHandling will be disabled"; + break; + } + } else { + inject(sigNum); + } } } #else |