diff options
author | Michi Henning <michi@zeroc.com> | 2002-11-13 03:47:26 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2002-11-13 03:47:26 +0000 |
commit | 2a336f55877147d0c38e0692dfd19dcecdf16ae1 (patch) | |
tree | 8e242382641d78edea0c41bfe1c412aae93719f1 /cpp/include/Ice/Application.h | |
parent | Fixed botched changes for Windows. (diff) | |
download | ice-2a336f55877147d0c38e0692dfd19dcecdf16ae1.tar.bz2 ice-2a336f55877147d0c38e0692dfd19dcecdf16ae1.tar.xz ice-2a336f55877147d0c38e0692dfd19dcecdf16ae1.zip |
Added interrupted() method so we can test whether a program terminated due
to a signal.
Diffstat (limited to 'cpp/include/Ice/Application.h')
-rw-r--r-- | cpp/include/Ice/Application.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cpp/include/Ice/Application.h b/cpp/include/Ice/Application.h index e983e050fe3..90ddaf7f413 100644 --- a/cpp/include/Ice/Application.h +++ b/cpp/include/Ice/Application.h @@ -83,10 +83,20 @@ public: static void holdInterrupt(); static void releaseInterrupt(); + // + // This method returns true if a signal handler was triggered, + // false otherwise. This can be used once Communicator::waitForShutdown() + // returns to test whether the shutdown was due to an interrupt (interrupted() + // returns true in that case) or because Communicator::shutdown() was called + // (interupted() returns false in that case). + // + static bool interrupted(); + private: static const char* _appName; static CommunicatorPtr _communicator; + static bool _interrupted; #ifdef _WIN32 friend BOOL WINAPI interruptHandler(DWORD); |