aboutsummaryrefslogtreecommitdiffstats
path: root/configd
diff options
context:
space:
mode:
authorArne Juul <arnej@yahooinc.com>2023-01-20 15:20:58 +0000
committerArne Juul <arnej@yahooinc.com>2023-01-20 15:20:58 +0000
commitd5dcebb39a859cca9dd9a94a89d90189eaa0f19a (patch)
treeaafd92b5b44a4e8bc8f140513330650df72a6e63 /configd
parenteffe4b34bb8a8740d9bf7ede11d24e2eaa0f8c15 (diff)
wait until we get config before hooking signals
Diffstat (limited to 'configd')
-rw-r--r--configd/src/apps/sentinel/env.cpp2
-rw-r--r--configd/src/apps/sentinel/sentinel.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/configd/src/apps/sentinel/env.cpp b/configd/src/apps/sentinel/env.cpp
index 44942080791..f679a3d47c7 100644
--- a/configd/src/apps/sentinel/env.cpp
+++ b/configd/src/apps/sentinel/env.cpp
@@ -55,6 +55,8 @@ void Env::boot(const std::string &configId) {
_cfgOwner.subscribe(configId, CONFIG_TIMEOUT_MS);
_modelOwner.start(CONFIG_TIMEOUT_MS, true);
// subscribe() should throw if something is not OK
+ vespalib::SignalHandler::TERM.hook();
+ vespalib::SignalHandler::INT.hook();
Connectivity checker;
for (int retry = 0; retry < maxConnectivityRetries; ++retry) {
bool changed = _cfgOwner.checkForConfigUpdate();
diff --git a/configd/src/apps/sentinel/sentinel.cpp b/configd/src/apps/sentinel/sentinel.cpp
index 3565c3c1a39..d1caa30d679 100644
--- a/configd/src/apps/sentinel/sentinel.cpp
+++ b/configd/src/apps/sentinel/sentinel.cpp
@@ -50,8 +50,6 @@ main(int argc, char **argv)
EV_STARTED("config-sentinel");
vespalib::SignalHandler::PIPE.ignore();
- vespalib::SignalHandler::TERM.hook();
- vespalib::SignalHandler::INT.hook();
vespalib::SignalHandler::CHLD.hook();
if (setenv("LC_ALL", "C", 1) != 0) {