diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-08-23 19:00:03 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-08-23 19:00:03 +0000 |
commit | 8ca05699193ee187e0fbad4f1dd7f97be855e07a (patch) | |
tree | 60aad649cd28023a4e53aed329df798944306339 /fetchmail.c | |
parent | cbc61d193386d307e35cc709591833175ed044d8 (diff) | |
download | fetchmail-8ca05699193ee187e0fbad4f1dd7f97be855e07a.tar.gz fetchmail-8ca05699193ee187e0fbad4f1dd7f97be855e07a.tar.bz2 fetchmail-8ca05699193ee187e0fbad4f1dd7f97be855e07a.zip |
This versioin works OK.
svn path=/trunk/; revision=60
Diffstat (limited to 'fetchmail.c')
-rw-r--r-- | fetchmail.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/fetchmail.c b/fetchmail.c index 0afe9463..54c15012 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -233,7 +233,7 @@ char **argv; * This is a nasty kluge. V8 sendmail doesn't like daemon mode, it * consistently bombs after the first delivery. */ - if (hostp->output == TO_MDA + if (poll_interval && hostp->output == TO_MDA && strncmp("/usr/lib/sendmail", hostp->mda, 18) == 0) hostp->output = TO_FOLDER; @@ -244,15 +244,21 @@ char **argv; } while (poll_interval); - termhook(); + if (outlevel == O_VERBOSE) + fprintf(stderr, "normal termination\n"); + + termhook(0); exit(popstatus); } -void termhook() +void termhook(int sig) { FILE *tmpfp; int idcount = 0; + if (sig != 0) + fprintf(stderr, "terminated with signal %d\n", sig); + for (hostp = hostlist; hostp; hostp = hostp->next) { if (hostp->lastid[0]) idcount++; @@ -534,6 +540,9 @@ int fd; int err; int childpid; + if (outlevel == O_VERBOSE) + fprintf(stderr, "about to close pipe %d\n", fd); + err = close(fd); #if defined(STDC_HEADERS) childpid = wait(NULL); @@ -543,6 +552,9 @@ int fd; if (err) perror("popclient: closemailpipe: close"); + if (outlevel == O_VERBOSE) + fprintf(stderr, "closed pipe %d\n", fd); + return(err); } |