loolwsd/LOOLBroker.cpp | 8 ++++++++ loolwsd/LOOLWSD.cpp | 8 ++++++++ 2 files changed, 16 insertions(+)
New commits: commit 661ae622599e450152d298eb9b114a9ad0dc9175 Author: Henry Castro <hcas...@collabora.com> Date: Wed Feb 3 17:43:04 2016 -0400 loolwsd: exit when error no child process diff --git a/loolwsd/LOOLBroker.cpp b/loolwsd/LOOLBroker.cpp index 6c3b3f8..a9af6cd 100644 --- a/loolwsd/LOOLBroker.cpp +++ b/loolwsd/LOOLBroker.cpp @@ -994,7 +994,15 @@ int main(int argc, char** argv) pipeHandler.syncChilds(); } else if (pid < 0) + { Log::error("Error: waitpid failed."); + // No child processes + if (errno == ECHILD) + { + TerminationFlag = true; + continue; + } + } if (forkCounter > 0) { diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp index 35b8cff..f382758 100644 --- a/loolwsd/LOOLWSD.cpp +++ b/loolwsd/LOOLWSD.cpp @@ -1049,7 +1049,15 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/) } } else if (pid < 0) + { Log::error("Error: waitpid failed."); + // No child processes + if (errno == ECHILD) + { + TerminationFlag = true; + continue; + } + } if (timeoutCounter++ == INTERVAL_PROBES) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits