diff options
author | Benoit Foucher <benoit@zeroc.com> | 2004-01-06 15:22:42 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2004-01-06 15:22:42 +0000 |
commit | d9a1ea800eade43032368f05e7f0279823146a9c (patch) | |
tree | c325291a63cfd392ff286d60aa6cba06ae08da9e /cpp | |
parent | minor (diff) | |
download | ice-d9a1ea800eade43032368f05e7f0279823146a9c.tar.bz2 ice-d9a1ea800eade43032368f05e7f0279823146a9c.tar.xz ice-d9a1ea800eade43032368f05e7f0279823146a9c.zip |
Fix
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/IcePack/IcePackNode.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/cpp/src/IcePack/IcePackNode.cpp b/cpp/src/IcePack/IcePackNode.cpp index dde17b3d56f..44f1bfd96a4 100644 --- a/cpp/src/IcePack/IcePackNode.cpp +++ b/cpp/src/IcePack/IcePackNode.cpp @@ -77,13 +77,20 @@ childHandler(int) // process and avoid zombie processes. See man wait or waitpid for // more information. // - pid_t childPid; + int olderrno = errno; + + pid_t pid; do - { - int status; - childPid = waitpid(-1, &status, WNOHANG); - } while(childPid > 0); + { + pid = waitpid(-1, 0, WNOHANG); + } + while(pid > 0); + + assert(pid != -1 || errno == ECHILD); + + errno = olderrno; } + } #endif |