From 22f7b0499e0a17a3e1bdde338a8b6018ac670b48 Mon Sep 17 00:00:00 2001 From: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> Date: Wed, 17 Apr 2024 22:57:02 +0300 Subject: [PATCH] Start watcher thread after fork (#17436) * Start watcher thread after fork * Remove old init --- src/daemon/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/daemon/main.c b/src/daemon/main.c index 591fcc38c4ed4b..768065fd15fa59 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -1889,9 +1889,6 @@ int main(int argc, char **argv) { load_cloud_conf(0); } - // @stelfrag: Where is the right place to call this? - watcher_thread_start(); - // ------------------------------------------------------------------------ // initialize netdata { @@ -2110,6 +2107,8 @@ int main(int argc, char **argv) { if(become_daemon(dont_fork, user) == -1) fatal("Cannot daemonize myself."); + watcher_thread_start(); + // init sentry #ifdef ENABLE_SENTRY sentry_native_init();