diff options
author | Matthew Newhook <matthew@zeroc.com> | 2007-01-04 19:45:49 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2007-01-04 19:45:49 +0000 |
commit | b7ea1155dfc3169efc4e7fd03447103029cfc0cb (patch) | |
tree | fd91f0a4e167214748d51bea37ea8693cd6ee786 /cpp/src/Ice/Application.cpp | |
parent | http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=1391. Fixed bug with (diff) | |
download | ice-b7ea1155dfc3169efc4e7fd03447103029cfc0cb.tar.bz2 ice-b7ea1155dfc3169efc4e7fd03447103029cfc0cb.tar.xz ice-b7ea1155dfc3169efc4e7fd03447103029cfc0cb.zip |
The user callback is now always called in the of a SIGHUP.
Diffstat (limited to 'cpp/src/Ice/Application.cpp')
-rw-r--r-- | cpp/src/Ice/Application.cpp | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/cpp/src/Ice/Application.cpp b/cpp/src/Ice/Application.cpp index dfc03f6949c..434bcdd7768 100644 --- a/cpp/src/Ice/Application.cpp +++ b/cpp/src/Ice/Application.cpp @@ -211,7 +211,6 @@ shutdownOnInterruptCallback(int signal) _callbackInProgress = false; } _condVar->signal(); - } static void @@ -226,10 +225,8 @@ userCallbackOnInterruptCallback(int signal) // return; } - if(_nohup && signal == SIGHUP) - { - return; - } + // For SIGHUP the user callback is always called. It can + // decide what to do. assert(!_callbackInProgress); _callbackInProgress = true; _interrupted = true; @@ -520,13 +517,9 @@ Ice::Application::destroyOnInterrupt() if(_ctrlCHandler->getCallback() == holdInterruptCallback) { _released = true; - _ctrlCHandler->setCallback(destroyOnInterruptCallback); _condVar->signal(); } - else - { - _ctrlCHandler->setCallback(destroyOnInterruptCallback); - } + _ctrlCHandler->setCallback(destroyOnInterruptCallback); } } @@ -539,13 +532,9 @@ Ice::Application::shutdownOnInterrupt() if(_ctrlCHandler->getCallback() == holdInterruptCallback) { _released = true; - _ctrlCHandler->setCallback(shutdownOnInterruptCallback); _condVar->signal(); } - else - { - _ctrlCHandler->setCallback(shutdownOnInterruptCallback); - } + _ctrlCHandler->setCallback(shutdownOnInterruptCallback); } } @@ -558,13 +547,9 @@ Ice::Application::ignoreInterrupt() if(_ctrlCHandler->getCallback() == holdInterruptCallback) { _released = true; - _ctrlCHandler->setCallback(0); _condVar->signal(); } - else - { - _ctrlCHandler->setCallback(0); - } + _ctrlCHandler->setCallback(0); } } @@ -577,13 +562,9 @@ Ice::Application::userCallbackOnInterrupt() if(_ctrlCHandler->getCallback() == holdInterruptCallback) { _released = true; - _ctrlCHandler->setCallback(userCallbackOnInterruptCallback); _condVar->signal(); } - else - { - _ctrlCHandler->setCallback(userCallbackOnInterruptCallback); - } + _ctrlCHandler->setCallback(userCallbackOnInterruptCallback); } } |