diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-09-26 13:55:29 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-09-26 13:55:29 +0000 |
commit | 0135a7c415665a09eefe0cd6545d322bff0aa361 (patch) | |
tree | 034c14dd355f8d4b4a6cfbbc70fe64a6534ee629 | |
parent | fcb2cd34462982b41c0586e6eb14ec1ad72cc484 (diff) | |
download | fetchmail-0135a7c415665a09eefe0cd6545d322bff0aa361.tar.gz fetchmail-0135a7c415665a09eefe0cd6545d322bff0aa361.tar.bz2 fetchmail-0135a7c415665a09eefe0cd6545d322bff0aa361.zip |
Avoid zombie proliferation.
svn path=/trunk/; revision=3487
-rw-r--r-- | fetchmail.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fetchmail.c b/fetchmail.c index e412e33d..2e8cd94f 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -463,14 +463,15 @@ int main(int argc, char **argv) SOCKSinit("fetchmail"); #endif /* HAVE_SOCKS */ + /* avoid zombies from plugins */ + deal_with_sigchld(); + /* * Maybe time to go to demon mode... */ if (run.poll_interval) { - if (nodetach) - deal_with_sigchld(); - else + if (!nodetach) daemonize(run.logfile, terminate_run); report(stdout, GT_("starting fetchmail %s daemon \n"), VERSION); @@ -484,7 +485,6 @@ int main(int argc, char **argv) } else { - deal_with_sigchld(); /* or else we may accumulate too many zombies */ if (run.logfile && access(run.logfile, F_OK) == 0) { freopen(run.logfile, "a", stdout); |