[Libreoffice-commits] online.git: loolwsd/DocumentBroker.hpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Thu Nov 10 05:16:43 UTC 2016


 loolwsd/DocumentBroker.hpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4c6aae20d5d57266fdefe9193b4e9d5be9bf3201
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Wed Nov 9 23:30:20 2016 -0500

    loolwsd: don't error when killing a dead child process
    
    Change-Id: I615911fb40a5218a6d1992dd94b63bff428699ee
    Reviewed-on: https://gerrit.libreoffice.org/30742
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/DocumentBroker.hpp b/loolwsd/DocumentBroker.hpp
index b5c1fa2..94a13f2 100644
--- a/loolwsd/DocumentBroker.hpp
+++ b/loolwsd/DocumentBroker.hpp
@@ -98,10 +98,10 @@ public:
             _ws.reset();
             if (_pid != -1 && kill(_pid, 0) != 0)
             {
-                if (rude)
+                if (errno != ESRCH && rude)
                 {
                     LOG_INF("Killing child [" << _pid << "].");
-                    if (kill(_pid, SIGINT) != 0 && kill(_pid, 0) != 0)
+                    if (kill(_pid, SIGINT) != 0 && kill(_pid, 0) != 0 && errno != ESRCH)
                     {
                         Log::syserror("Cannot terminate lokit [" + std::to_string(_pid) + "]. Abandoning.");
                     }


More information about the Libreoffice-commits mailing list