summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-04-12 22:03:03 +0100
committerMichael Meeks <michael.meeks@collabora.com>2024-04-13 20:07:16 +0100
commitbae0a91082085a3335eafdb7eeca5afe9a84342b (patch)
tree24ea1778e2c05f270e2d17063da381014f459ff5
parentUpdate l10n files for Weblate (diff)
downloadonline-bae0a91082085a3335eafdb7eeca5afe9a84342b.tar.gz
online-bae0a91082085a3335eafdb7eeca5afe9a84342b.zip
use SigUtil::setUserSignals before creating SocketPoll
The SocketPoll ctor which may, depending on COOL_WATCHDOG env variable, want to override the SIG2 handler so set user signal handlers before that otherwise tthat choice is overwritten Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com> Change-Id: I305570ab8becb41f0696e60908c1ca26fd9ba14a
-rw-r--r--kit/ForKit.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/kit/ForKit.cpp b/kit/ForKit.cpp
index 316c571606..6da65d4daa 100644
--- a/kit/ForKit.cpp
+++ b/kit/ForKit.cpp
@@ -807,6 +807,11 @@ int forkit_main(int argc, char** argv)
Log::logger().setLevel(LogLevel);
}
+ // The SocketPoll ctor which may, depending on COOL_WATCHDOG env variable,
+ // want to override the SIG2 handler so set user signal handlers before
+ // that otherwise that choice is overwritten
+ SigUtil::setUserSignals();
+
ForKitPoll.reset(new SocketPoll (Util::getThreadName()));
ForKitPoll->runOnClientThread(); // We will do the polling on this thread.
@@ -822,8 +827,6 @@ int forkit_main(int argc, char** argv)
Util::forcedExit(EX_SOFTWARE);
}
- SigUtil::setUserSignals();
-
const int parentPid = getppid();
LOG_INF("ForKit process is ready. Parent: " << parentPid);