Skip to content

Commit

Permalink
Start watcher thread after fork (netdata#17436)
Browse files Browse the repository at this point in the history
* Start watcher thread after fork

* Remove old init
  • Loading branch information
stelfrag authored Apr 17, 2024
1 parent 668e63e commit 22f7b04
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/daemon/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 22f7b04

Please sign in to comment.