diff options
author | Bernard Normier <bernard@zeroc.com> | 2005-02-18 18:08:56 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2005-02-18 18:08:56 +0000 |
commit | ba195a1f2844661e7f3151c0b938d09d3904b200 (patch) | |
tree | cada8c242d0a676f7f60e2708ee6fa81bfb1d868 /cpp/src | |
parent | isDestroyed fix (diff) | |
download | ice-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.cpp | 18 |
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. // |