[Libreoffice-commits] online.git: common/IoUtil.cpp kit/ForKit.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Tue Nov 29 02:43:05 UTC 2016
common/IoUtil.cpp | 1 +
kit/ForKit.cpp | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 7a4250b90e4273f73ab5ab94c35728aeba9f0d63
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
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 <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
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.");
}
More information about the Libreoffice-commits
mailing list