loolwsd/LOOLForKit.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
New commits: commit d012075dc89bfed2f5c69b8bc18009ec625023d3 Author: Tor Lillqvist <t...@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) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits