From 22d39ae5b5cd6db62af087f3dc64ee7b4566ca0a Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 17 Dec 1996 10:50:11 +0000 Subject: SIGHUP -> SIGUSR1. svn path=/trunk/; revision=647 --- NEWS | 7 +++++-- fetchmail.c | 10 +++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index db9e289d..f7014c97 100644 --- a/NEWS +++ b/NEWS @@ -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) -- cgit v1.2.3