diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1999-09-11 02:23:28 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1999-09-11 02:23:28 +0000 |
commit | 8f826df8fbadd811f6bcc31344e3d8472bd6f2bb (patch) | |
tree | b58fefa9fefe9ebb3ecc7721c464d978a0fc41c8 /fetchmail.c | |
parent | dd6e5c6501f58c49445f2d5b5da978183303f275 (diff) | |
download | fetchmail-8f826df8fbadd811f6bcc31344e3d8472bd6f2bb.tar.gz fetchmail-8f826df8fbadd811f6bcc31344e3d8472bd6f2bb.tar.bz2 fetchmail-8f826df8fbadd811f6bcc31344e3d8472bd6f2bb.zip |
Code changes needed for next release.
svn path=/trunk/; revision=2552
Diffstat (limited to 'fetchmail.c')
-rw-r--r-- | fetchmail.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fetchmail.c b/fetchmail.c index ee790597..28c7515c 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -72,6 +72,7 @@ char *home; /* invoking user's home directory */ char *program_name; /* the name to prefix error messages with */ flag configdump; /* dump control blocks for configurator */ const char *fetchmailhost; /* either `localhost' or the host's FQDN */ +volatile int lastsig; /* last signal received */ #if NET_SECURITY void *request = NULL; @@ -81,7 +82,6 @@ int requestlen = 0; static char *lockfile; /* name of lockfile */ static int querystatus; /* status of query */ static int successes; /* count number of successful polls */ -static int lastsig; /* last signal received */ static struct runctl cmd_run; /* global options set from command line */ static void termhook(int); /* forward declaration of exit hook */ @@ -757,8 +757,10 @@ int main(int argc, char **argv) timeout.tv_sec = run.poll_interval; timeout.tv_usec = 0; - lastsig = 0; - select(0,0,0,0, &timeout); + do { + lastsig = 0; + select(0,0,0,0, &timeout); + } while (lastsig == SIGCHLD); #endif #else /* EMX */ alarm_latch = FALSE; |