[Libreoffice-commits] online.git: loolwsd/LOOLWSD.cpp loolwsd/Util.cpp loolwsd/Util.hpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Mon Nov 14 14:00:35 UTC 2016


 loolwsd/LOOLWSD.cpp |    1 -
 loolwsd/Util.cpp    |   13 +------------
 loolwsd/Util.hpp    |    3 ---
 3 files changed, 1 insertion(+), 16 deletions(-)

New commits:
commit 01a6274d7cc55859868176eb6d1135d2804c14ec
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Mon Nov 14 07:36:12 2016 -0500

    loolwsd: support forced termination in kits as well
    
    Change-Id: I301cf2f36888b7095f8565bc0badcfc5a927518c
    Reviewed-on: https://gerrit.libreoffice.org/30844
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 2d2c15a..1ee548c 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1848,7 +1848,6 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
 {
     Util::setFatalSignals();
     Util::setTerminationSignals();
-    Util::setInterruptionSignal();
 
     // down-pay all the forkit linking cost once & early.
     Environment::set("LD_BIND_NOW", "1");
diff --git a/loolwsd/Util.cpp b/loolwsd/Util.cpp
index 11d19d1..85ccd1e 100644
--- a/loolwsd/Util.cpp
+++ b/loolwsd/Util.cpp
@@ -227,23 +227,12 @@ namespace Util
         action.sa_flags = 0;
         action.sa_handler = handleTerminationSignal;
 
+        sigaction(SIGINT, &action, nullptr);
         sigaction(SIGTERM, &action, nullptr);
         sigaction(SIGQUIT, &action, nullptr);
         sigaction(SIGHUP, &action, nullptr);
     }
 
-    /// Handle SIGINT, should be set by WSD only.
-    void setInterruptionSignal()
-    {
-        struct sigaction action;
-
-        sigemptyset(&action.sa_mask);
-        action.sa_flags = 0;
-        action.sa_handler = handleTerminationSignal;
-
-        sigaction(SIGINT, &action, nullptr);
-    }
-
     static char FatalGdbString[256] = { '\0' };
 
     static
diff --git a/loolwsd/Util.hpp b/loolwsd/Util.hpp
index 792835c..3abc53e 100644
--- a/loolwsd/Util.hpp
+++ b/loolwsd/Util.hpp
@@ -91,9 +91,6 @@ namespace Util
     /// Trap all fatal signals to assist debugging.
     void setFatalSignals();
 
-    /// Trap SIGINT, should be set by WSD only.
-    void setInterruptionSignal();
-
     void requestTermination(const Poco::Process::PID& pid);
 
     /// Kills a child process and returns true when


More information about the Libreoffice-commits mailing list