[Libreoffice-commits] online.git: loolwsd/LOOLForKit.cpp
Tor Lillqvist
tml at collabora.com
Mon Apr 18 13:40:57 UTC 2016
loolwsd/LOOLForKit.cpp | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
New commits:
commit d012075dc89bfed2f5c69b8bc18009ec625023d3
Author: Tor Lillqvist <tml at collabora.com>
Date: Mon Apr 18 16:23:25 2016 +0300
Sanity check
diff --git a/loolwsd/LOOLForKit.cpp b/loolwsd/LOOLForKit.cpp
index c2dad0b..8b79db6 100644
--- a/loolwsd/LOOLForKit.cpp
+++ b/loolwsd/LOOLForKit.cpp
@@ -148,9 +148,16 @@ static int createLibreOfficeKit(const std::string& childRoot,
int status;
while ((exitedChildPid = waitpid(-1, &status, WNOHANG)) > 0)
{
- Log::info("Child " + std::to_string(exitedChildPid) + " has exited, removing its jail '" + childJails[exitedChildPid] + "'");
- Util::removeFile(childJails[exitedChildPid], true);
- childJails.erase(exitedChildPid);
+ if (childJails.find(exitedChildPid) != childJails.end())
+ {
+ Log::info("Child " + std::to_string(exitedChildPid) + " has exited, removing its jail '" + childJails[exitedChildPid] + "'");
+ Util::removeFile(childJails[exitedChildPid], true);
+ childJails.erase(exitedChildPid);
+ }
+ else
+ {
+ Log::error("Unknown child " + std::to_string(exitedChildPid) + " has exited");
+ }
}
if (pid < 0)
More information about the Libreoffice-commits
mailing list