[Libreoffice-commits] online.git: loolwsd/LOOLBroker.cpp loolwsd/LOOLWSD.cpp
Henry Castro
hcastro at collabora.com
Wed Feb 3 21:43:25 UTC 2016
loolwsd/LOOLBroker.cpp | 8 ++++++++
loolwsd/LOOLWSD.cpp | 8 ++++++++
2 files changed, 16 insertions(+)
New commits:
commit 661ae622599e450152d298eb9b114a9ad0dc9175
Author: Henry Castro <hcastro at 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)
{
More information about the Libreoffice-commits
mailing list