diff options
| -rw-r--r-- | NEWS | 7 | ||||
| -rw-r--r-- | fetchmail.c | 10 | 
2 files changed, 10 insertions, 7 deletions
| @@ -4,8 +4,8 @@    error(), but since they are built piecemeal, they go to stderr.  What    would be needed is an error() variant that didn't write a message until    it got a trailing \n -- otherwise, if a syslog option were added, these -  messages would wind up as separate syslog calls -- probably not the desired -  result. +  messages would wind up as separate syslog calls (probably not the desired +  result).  			Release Notes: @@ -26,6 +26,9 @@ features --    through the error() subroutine.  This is a first step towards allowing    a daemon-mode fetchmail to use syslog. +* SIGUSR1 is now used for wakeup rather than SIGHUP.  This eliminates any +  possible confusion about fetchmail's behavior at logout time. +  bugs --  * Fixed a FreeBSD compilation glitch involving SIGCLD (thanks to diff --git a/fetchmail.c b/fetchmail.c index 6c18dedb..59b59a01 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -252,7 +252,7 @@ int main (int argc, char **argv)  		 pid);  		return(PS_EXCLUDE);  	} -	else if (kill(pid, SIGHUP) == 0) +	else if (kill(pid, SIGUSR1) == 0)  	{  	    fprintf(stderr,  		    "fetchmail: background fetchmail at %d awakened.\n", @@ -263,7 +263,7 @@ int main (int argc, char **argv)  	{  	    /*  	     * Should never happen -- possible only if a background fetchmail -	     * croaks after the first kill probe above but before the SIGHUP +	     * croaks after the first kill probe above but before the SIGUSR1  	     * transmission.  	     */  	    fprintf(stderr, @@ -312,7 +312,7 @@ int main (int argc, char **argv)       * side effect of interrupting any sleep that may be going on,       * forcing fetchmail to re-poll its hosts.       */ -    signal(SIGHUP, donothing); +    signal(SIGUSR1, donothing);      /* here's the exclusion lock */      if ( (lockfp = fopen(lockfile,"w")) != NULL ) { @@ -426,8 +426,8 @@ int main (int argc, char **argv)  		setitimer(ITIMER_REAL,&ntimeout,NULL);  		signal(SIGALRM, donothing);  		pause(); -		if (lastsig == SIGHUP) -		    (void) error(0, 0, "awakened by SIGHUP"); +		if (lastsig == SIGUSR1) +		    (void) error(0, 0, "awakened by SIGUSR1");  	    }  	    if (outlevel == O_VERBOSE) | 
