common/IoUtil.cpp | 1 + kit/ForKit.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)
New commits: commit 7a4250b90e4273f73ab5ab94c35728aeba9f0d63 Author: Ashod Nakashian <[email protected]> Date: Mon Nov 28 20:34:18 2016 -0500 loolwsd: terminate forkit when wsd dies When we the pipe with wsd is closed we assume wsd has died and we terminate too. WSD can fork us anew, if it's still alive. Change-Id: I669ed717db973b50498a6bc08e1fca59c6563443 Reviewed-on: https://gerrit.libreoffice.org/31337 Reviewed-by: Ashod Nakashian <[email protected]> Tested-by: Ashod Nakashian <[email protected]> diff --git a/common/IoUtil.cpp b/common/IoUtil.cpp index 6fea0b4..32238f3 100644 --- a/common/IoUtil.cpp +++ b/common/IoUtil.cpp @@ -329,6 +329,7 @@ int PipeReader::readLine(std::string& line, } else if (pipe.revents & (POLLERR | POLLHUP | POLLNVAL)) { + LOG_FTL("Pipe closed."); return -1; } } diff --git a/kit/ForKit.cpp b/kit/ForKit.cpp index 4680c4d..b727817 100644 --- a/kit/ForKit.cpp +++ b/kit/ForKit.cpp @@ -75,9 +75,9 @@ public: if (ready <= 0) { // Termination is done via SIGTERM, which breaks the wait. - if (TerminationFlag) + if (ready < 0) { - if (ready < 0) + if (TerminationFlag) { LOG_INF("Poll interrupted in " << getName() << " and Termination flag set."); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
