diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2000-03-29 19:39:12 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2000-03-29 19:39:12 +0000 |
commit | b5cb227ae077ce4d1e01c7487e40bfd84167cff3 (patch) | |
tree | b6a6baca28154eabd59e4778466e8fd23ef54ef7 /fetchmail.c | |
parent | 4567784e2b9cd5b592b1b16056449ac24d80eedd (diff) | |
download | fetchmail-b5cb227ae077ce4d1e01c7487e40bfd84167cff3.tar.gz fetchmail-b5cb227ae077ce4d1e01c7487e40bfd84167cff3.tar.bz2 fetchmail-b5cb227ae077ce4d1e01c7487e40bfd84167cff3.zip |
Suppress monitor check after signal wakeup.
svn path=/trunk/; revision=2843
Diffstat (limited to 'fetchmail.c')
-rw-r--r-- | fetchmail.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fetchmail.c b/fetchmail.c index 76580ca2..99547745 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -125,6 +125,7 @@ int main(int argc, char **argv) netrc_entry *netrc_list; char *netrc_file, *tmpbuf; pid_t pid; + int lastsig = 0; #ifdef __FreeBSD__ dropprivs(); @@ -626,8 +627,11 @@ int main(int argc, char **argv) } #if (defined(linux) && !INET6_ENABLE) || defined(__FreeBSD__) - /* interface_approve() does its own error logging */ - if (!interface_approve(&ctl->server)) + /* + * Don't do monitoring if we were woken by a signal. + * Note that interface_approve() does its own error logging. + */ + if (!interface_approve(&ctl->server, !lastsig)) continue; #endif /* (defined(linux) && !INET6_ENABLE) || defined(__FreeBSD__) */ @@ -703,8 +707,6 @@ int main(int argc, char **argv) */ if (run.poll_interval) { - int lastsig; - /* * Because passwords can expire, it may happen that *all* * hosts are now out of the loop due to authfail @@ -731,7 +733,7 @@ int main(int argc, char **argv) /* * OK, now pause util it's time for the next poll cycle. - * A TRUE return indicates we received a wakeup signal; + * A nonzero return indicates we received a wakeup signal; * unwedge all servers in case the problem has been * manually repaired. */ |