From edacc32d007ba8dd0cb61f0c3daea81622a8b350 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 24 Aug 1996 14:09:50 +0000 Subject: Sendmail delivery from background seems to work. svn path=/trunk/; revision=61 --- NEWS | 6 ++---- daemon.c | 8 ++++---- fetchmail.c | 9 --------- fetchmail.h | 2 +- fetchmail.man | 11 ++--------- 5 files changed, 9 insertions(+), 27 deletions(-) diff --git a/NEWS b/NEWS index a6cd90b0..6b4e062b 100644 --- a/NEWS +++ b/NEWS @@ -2,10 +2,6 @@ To-do list: -Why doesn't sendmail delivery work in daemon mode? In daemon mode -(but not in normal run-to-completion mode) popclient croaks after -its first delivery (there's a kluge in popclient.c to deal with this). - Option to enable EMACS-like user folder versioning on each run. -p option to come back? @@ -18,6 +14,8 @@ Implement IMAP support. * MDA arguments are now dumped when using the -V option. +* Sendmail delivery from background seems to work now. + 3.05: * Experimental support for RFC1725-compliant POP servers with the UIDL diff --git a/daemon.c b/daemon.c index cfb6e53e..89ccdcd6 100644 --- a/daemon.c +++ b/daemon.c @@ -34,7 +34,7 @@ #include "popclient.h" -static void (*my_termhook)(void); +static void (*my_termhook)(int); /****************************************************************** function: sigchld_handler @@ -59,7 +59,7 @@ sigchld_handler () #endif if (my_termhook) - (*my_termhook)(); + (*my_termhook)(SIGCHLD); #if defined(HAVE_WAIT3) while ((pid = wait3(&status, WNOHANG, (struct rusage *) 0)) > 0) @@ -85,14 +85,14 @@ sigchld_handler () logfile file to direct stdout and stderr to, if non-NULL. ret. value: none. - globals: refers to the address of sigchld_handler(). + globals: termhook, sigchld_handler(). calls: none. *****************************************************************/ int daemonize (logfile, termhook) const char *logfile; -void (*termhook)(void); +void (*termhook)(int); { int fd; pid_t childpid; diff --git a/fetchmail.c b/fetchmail.c index 54c15012..8ed8f67b 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -228,15 +228,6 @@ char **argv; */ do { for (hostp = hostlist; hostp; hostp = hostp->next) { - - /* - * This is a nasty kluge. V8 sendmail doesn't like daemon mode, it - * consistently bombs after the first delivery. - */ - if (poll_interval && hostp->output == TO_MDA - && strncmp("/usr/lib/sendmail", hostp->mda, 18) == 0) - hostp->output = TO_FOLDER; - popstatus = query_host(hostp); } diff --git a/fetchmail.h b/fetchmail.h index 5d071bb2..a65e3773 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -104,7 +104,7 @@ int closemailpipe (int); char *MD5Digest (char *); void reply_hack(char *, const char *); void append_server_names(int *, char **); -int daemonize(const char *, void (*)(void)); +int daemonize(const char *, void (*)(int)); #else diff --git a/fetchmail.man b/fetchmail.man index 7aba6e50..f6eeca3e 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -542,15 +542,8 @@ default location of file associating hosts with last message IDs seen (used only with newer RFC1725-compliant servers supporting the UIDL command). .SH BUGS .PP -Delivery via -.IR sendmail (8) -doesn't work in daemon mode; -.I popmail -dies after the first delivery. To cope with this, in daemon mode the -delivery mode is automatically switched to append-and-lock if sendmail -is the selected delivery agent. This needs to be fixed. -.PP -The UIDL support for RFC1725-compliant servers is not yet well tested. +The UIDL support for RFC1725-compliant servers without LAST is not yet +very well tested. .PP No IMAP or RPOP support yet. .PP -- cgit v1.2.3