summaryrefslogtreecommitdiff
path: root/cpp/include/Ice/Application.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/include/Ice/Application.h')
-rw-r--r--cpp/include/Ice/Application.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/cpp/include/Ice/Application.h b/cpp/include/Ice/Application.h
index ca3cd658188..4f2c27300e0 100644
--- a/cpp/include/Ice/Application.h
+++ b/cpp/include/Ice/Application.h
@@ -38,6 +38,16 @@ public:
virtual int run(int, char*[]) = 0;
//
+ // Override this to provide a custom application interrupt
+ // hook. You must call userCallbackOnInterrupt for this method to
+ // be called. Note that the interruptCallback can be called
+ // concurrently with any other thread (including main) in your
+ // application and thus must take appropriate concurrency
+ // precautions.
+ //
+ virtual void interruptCallback(int);
+
+ //
// Return the application name, i.e., argv[0].
//
static const char* appName();
@@ -58,6 +68,7 @@ public:
static void destroyOnInterrupt();
static void shutdownOnInterrupt();
static void ignoreInterrupt();
+ static void userCallbackOnInterrupt();
//
// These methods can be used to temporarily block a signal and
@@ -81,7 +92,6 @@ public:
//
static bool interrupted();
-
#if defined(__SUNPRO_CC)
//
// Sun C++ 5.x does not like classes with no data members