Start watcher thread after fork (#17436)
* Start watcher thread after fork * Remove old init
Stelios Fragkakis committed
Apr 17, 2024 at 22:57 UTC
22f7b0499e0a17a3e1bdde338a8b6018ac670b48
1 file changed
+2
-3
src/daemon/main.c
+2
-3
@@ -1889,9 +1889,6 @@ int main(int argc, char **argv) {
1889
load_cloud_conf(0);
1890
}
1891
1892
- // @stelfrag: Where is the right place to call this?
1893
- watcher_thread_start();
1894
-
1892
// ------------------------------------------------------------------------
1893
// initialize netdata
1894
{
@@ -2110,6 +2107,8 @@ int main(int argc, char **argv) {
2107
if(become_daemon(dont_fork, user) == -1)
2108
fatal("Cannot daemonize myself.");
2109
2110
+ watcher_thread_start();
2111
+
2112
// init sentry
2113
#ifdef ENABLE_SENTRY
2114
sentry_native_init();