summaryrefslogtreecommitdiff
path: root/cpp/demo/Freeze/bench/Client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/demo/Freeze/bench/Client.cpp')
-rw-r--r--cpp/demo/Freeze/bench/Client.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/cpp/demo/Freeze/bench/Client.cpp b/cpp/demo/Freeze/bench/Client.cpp
index e0e70dac728..e0aaab24e2a 100644
--- a/cpp/demo/Freeze/bench/Client.cpp
+++ b/cpp/demo/Freeze/bench/Client.cpp
@@ -144,6 +144,7 @@ public:
TestApp(const string&);
virtual int run(int, char*[]);
+ virtual void interruptCallback(int);
private:
@@ -717,6 +718,12 @@ typedef IceUtil::Handle<MyFactory> MyFactoryPtr;
int
TestApp::run(int argc, char* argv[])
{
+ //
+ // Since this is an interactive demo we want the custom interrupt
+ // callback to be called when the process is interrupted.
+ //
+ userCallbackOnInterrupt();
+
_connection = Freeze::createConnection(communicator(), _envName);
cout << "IntIntMap" << endl;
@@ -810,6 +817,12 @@ TestApp::run(int argc, char* argv[])
return EXIT_SUCCESS;
}
+void
+TestApp::interruptCallback(int)
+{
+ exit(EXIT_SUCCESS);
+}
+
int
main(int argc, char* argv[])
{