diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-06-24 21:49:12 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-06-24 21:49:12 +0000 |
commit | 044167be217dd75e671221f6f2e12f3f922a0ae4 (patch) | |
tree | 4d3ce8151616640ebcdd71abd307aa8579cf3667 /fetchmail.c | |
parent | 5d58bb226add86807ea2258d970f7c2c7334fbf2 (diff) | |
download | fetchmail-044167be217dd75e671221f6f2e12f3f922a0ae4.tar.gz fetchmail-044167be217dd75e671221f6f2e12f3f922a0ae4.tar.bz2 fetchmail-044167be217dd75e671221f6f2e12f3f922a0ae4.zip |
Signal cleanup.
svn path=/trunk/; revision=3375
Diffstat (limited to 'fetchmail.c')
-rw-r--r-- | fetchmail.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fetchmail.c b/fetchmail.c index 7b3ca71c..233a36d1 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -493,13 +493,16 @@ int main(int argc, char **argv) if (run.poll_interval && !getuid()) signal(SIGHUP, SIG_IGN); } - else if (run.logfile && access(run.logfile, F_OK) == 0) + else { - freopen(run.logfile, "a", stdout); - freopen(run.logfile, "a", stderr); + 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); + freopen(run.logfile, "a", stderr); + } } - #ifdef linux interface_init(); #endif /* linux */ |