Start watcher thread after fork (#17436)

* Start watcher thread after fork

* Remove old init
This commit is contained in:
Stelios Fragkakis 2024-04-17 22:57:02 +03:00 committed by GitHub
parent 668e63e748
commit 22f7b0499e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 3 deletions

View File

@ -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();