summaryrefslogtreecommitdiff
path: root/cpp/src/IcePack/IcePackNode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IcePack/IcePackNode.cpp')
-rw-r--r--cpp/src/IcePack/IcePackNode.cpp21
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();