From b5cb227ae077ce4d1e01c7487e40bfd84167cff3 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 29 Mar 2000 19:39:12 +0000 Subject: Suppress monitor check after signal wakeup. svn path=/trunk/; revision=2843 --- fetchmail.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'fetchmail.c') 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. */ -- cgit v1.2.3