diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2015-05-05 23:01:14 +0300 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2015-05-05 23:01:14 +0300 |
commit | 557d1c9543199ed9098df800f32b920bee001674 (patch) | |
tree | dfbef6943e61a5e56e9678a193611f97b4166d72 /src/daemon.c | |
parent | f2d6c09004afe07c926a84c70f24ccbd74f8799b (diff) |
fix for defunct childs
Diffstat (limited to 'src/daemon.c')
-rwxr-xr-x | src/daemon.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/daemon.c b/src/daemon.c index 2b66aa042f..e40040f6c6 100755 --- a/src/daemon.c +++ b/src/daemon.c @@ -37,8 +37,8 @@ void sig_handler(int signo) signal(SIGQUIT, SIG_IGN); signal(SIGHUP, SIG_IGN); signal(SIGINT, SIG_IGN); + signal(SIGCHLD, SIG_IGN); kill_childs(); - process_childs(0); rrdset_free_all(); //unlink("/var/run/netdata.pid"); info("NetData exiting. Bye bye..."); @@ -51,12 +51,6 @@ void sig_handler(int signo) // info("Ignoring signal %d. Errno: %d (%s)", signo, errno, strerror(errno)); break; - - case SIGCHLD: - info("Received SIGCHLD (signal %d).", signo); - process_childs(0); - break; - default: info("Signal %d received. Falling back to default action for it.", signo); signal(signo, SIG_DFL); @@ -200,8 +194,8 @@ int become_daemon(int close_all_files, const char *input, const char *output, co if (setsid() < 0) exit(2); - signal(SIGCHLD, SIG_IGN); - signal(SIGHUP, SIG_IGN); + signal(SIGCHLD, SIG_IGN); + signal(SIGHUP, SIG_IGN); signal(SIGWINCH, SIG_IGN); // fork() again |