summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2005-02-18 18:08:56 +0000
committerBernard Normier <bernard@zeroc.com>2005-02-18 18:08:56 +0000
commitba195a1f2844661e7f3151c0b938d09d3904b200 (patch)
treecada8c242d0a676f7f60e2708ee6fa81bfb1d868 /cpp/src
parentisDestroyed fix (diff)
downloadice-ba195a1f2844661e7f3151c0b938d09d3904b200.tar.bz2
ice-ba195a1f2844661e7f3151c0b938d09d3904b200.tar.xz
ice-ba195a1f2844661e7f3151c0b938d09d3904b200.zip
CtrlCHandler before communicator init
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/Application.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/cpp/src/Ice/Application.cpp b/cpp/src/Ice/Application.cpp
index b60a8c7e862..be5df3eaf9a 100644
--- a/cpp/src/Ice/Application.cpp
+++ b/cpp/src/Ice/Application.cpp
@@ -176,6 +176,15 @@ Ice::Application::main(int argc, char* argv[], const char* configFile)
try
{
+ //
+ // Ignore signals for a little while.
+ //
+ //
+ // Note that the communicator must be created BEFORE the communicator,
+ // since the communicator initialization may create threads.
+ //
+ _ctrlCHandler.reset(new IceUtil::CtrlCHandler);
+
if(configFile)
{
PropertiesPtr properties = createProperties(argc, argv);
@@ -186,17 +195,12 @@ Ice::Application::main(int argc, char* argv[], const char* configFile)
{
_communicator = initialize(argc, argv);
}
-
- //
- // Ignore signals for a little while.
- //
- _ctrlCHandler.reset(new IceUtil::CtrlCHandler);
-
+
//
// Used by destroyOnInterruptCallback and shutdownOnInterruptCallback.
//
_nohup = (_communicator->getProperties()->getPropertyAsInt("Ice.Nohup") > 0);
-
+
//
// The default is to destroy when a signal is received.
//