diff options
Diffstat (limited to 'cpp/src/IcePack/Activator.cpp')
-rw-r--r-- | cpp/src/IcePack/Activator.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cpp/src/IcePack/Activator.cpp b/cpp/src/IcePack/Activator.cpp index ecc3a84da62..a75bc1b4874 100644 --- a/cpp/src/IcePack/Activator.cpp +++ b/cpp/src/IcePack/Activator.cpp @@ -13,6 +13,7 @@ #include <IcePack/Admin.h> #include <sstream> #include <fcntl.h> +#include <sys/wait.h> using namespace std; using namespace Ice; @@ -296,6 +297,17 @@ IcePack::Activator::terminationListener() } } } + + // + // Remove zombie processes, if any + // + if (waitpid(-1, 0, WNOHANG | WUNTRACED) == -1) + { + if (errno != ECHILD) // Ignore ECHILD + { + throw SystemException(__FILE__, __LINE__); + } + } } } |