diff options
author | Bernard Normier <bernard@zeroc.com> | 2004-01-06 05:41:48 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2004-01-06 05:41:48 +0000 |
commit | 27e8aeb01896fe2a9f8343dcff20922f64159f31 (patch) | |
tree | 21b45b8228cef240812bf7d80486d67b91c1a35a /cpp/src/IcePack/IcePackNode.cpp | |
parent | fix for linker warning (diff) | |
download | ice-27e8aeb01896fe2a9f8343dcff20922f64159f31.tar.bz2 ice-27e8aeb01896fe2a9f8343dcff20922f64159f31.tar.xz ice-27e8aeb01896fe2a9f8343dcff20922f64159f31.zip |
Changed signal handler to work with NPTL and Java on Linux
Diffstat (limited to 'cpp/src/IcePack/IcePackNode.cpp')
-rw-r--r-- | cpp/src/IcePack/IcePackNode.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/cpp/src/IcePack/IcePackNode.cpp b/cpp/src/IcePack/IcePackNode.cpp index c03c26ee8fb..dde17b3d56f 100644 --- a/cpp/src/IcePack/IcePackNode.cpp +++ b/cpp/src/IcePack/IcePackNode.cpp @@ -77,9 +77,13 @@ childHandler(int) // process and avoid zombie processes. See man wait or waitpid for // more information. // - wait(0); + pid_t childPid; + do + { + int status; + childPid = waitpid(-1, &status, WNOHANG); + } while(childPid > 0); } - } #endif @@ -342,16 +346,17 @@ main(int argc, char* argv[]) int status; try { - // - // Initialize the communicator. - // - communicator = Ice::initialize(argc, argv); - - // + // // Handles CTRL+C like signals. Initially, just ignore them // IceUtil::CtrlCHandler ctrlCHandler; _ctrlCHandler = &ctrlCHandler; + + // + // Initialize the communicator. + // + communicator = Ice::initialize(argc, argv); + Ice::PropertiesPtr properties = communicator->getProperties(); |