[Libreoffice-commits] online.git: loolwsd/LOOLKit.cpp
Henry Castro
hcastro at collabora.com
Wed Dec 30 16:49:16 PST 2015
loolwsd/LOOLKit.cpp | 33 ---------------------------------
1 file changed, 33 deletions(-)
New commits:
commit c38d1644ffb0bd68baf6bd70419c3babde1cea8e
Author: Henry Castro <hcastro at collabora.com>
Date: Wed Dec 30 20:48:03 2015 -0400
loolwsd: simplify handle signals
diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 8ab1597..7a5e5d7 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -60,8 +60,6 @@ using Poco::FastMutex;
const std::string CHILD_URI = "/loolws/child/";
const std::string LOKIT_BROKER = "/tmp/loolbroker.fifo";
-#ifndef LOOLKIT_NO_MAIN
-// handle the signals when we are not using shared pages, execv() system call
static volatile bool TerminationFlag = false;
namespace
@@ -89,37 +87,6 @@ namespace
}
}
-#else
-// handle the signals when we are using shared pages, fork() system call
-static volatile bool TerminationFlag = false;
-
-namespace
-{
- void handleSignal(int aSignal)
- {
- Log::info() << "Signal received: " << strsignal(aSignal) << Log::end;
- TerminationFlag = true;
- }
-
- void setSignals(bool isIgnored)
- {
-#ifdef __linux
- struct sigaction aSigAction;
-
- sigemptyset(&aSigAction.sa_mask);
- aSigAction.sa_flags = 0;
- aSigAction.sa_handler = (isIgnored ? SIG_IGN : handleSignal);
-
- sigaction(SIGTERM, &aSigAction, NULL);
- sigaction(SIGINT, &aSigAction, NULL);
- sigaction(SIGQUIT, &aSigAction, NULL);
- sigaction(SIGHUP, &aSigAction, NULL);
-#endif
- }
-}
-
-#endif
-
// This thread handles callbacks from the
// lokit instance.
class CallBackWorker: public Runnable
More information about the Libreoffice-commits
mailing list