diff options
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | driver.c | 16 |
4 files changed, 20 insertions, 3 deletions
diff --git a/Makefile.in b/Makefile.in index 6e533e6e..dfaf5899 100644 --- a/Makefile.in +++ b/Makefile.in @@ -4,7 +4,7 @@ # So just uncomment all the lines marked QNX. PACKAGE = fetchmail -VERSION = 4.7.2 +VERSION = 4.7.3 SUBDIRS = @INTLSUB@ @POSUB@ @@ -5,8 +5,9 @@ fetchmail-4.7.3 (): * Do a full antispam check on the EOM response in case the local MTA does content analysis of the message body. * Bouncemail now conforms to RFC1984 correctly. +* Use sigprocmask to avoid Ron Gomes's weird hang bug (I hope). -There are 249 people on fetchmail-friends and 337 on fetchmail-announce. +There are 248 people on fetchmail-friends and 336 on fetchmail-announce. fetchmail-4.7.2 (Fri Dec 25 01:01:54 EST 1998): * Don't append the destination address to a postmaster name containing @. diff --git a/configure.in b/configure.in index 19bd22a4..11dce675 100644 --- a/configure.in +++ b/configure.in @@ -124,7 +124,7 @@ AC_SUBST(EXTRAOBJ) AC_CHECK_FUNCS(tcsetattr stty setsid seteuid gethostbyname res_search herror \ strrchr strerror setlinebuf syslog snprintf vprintf vsnprintf vsyslog \ - atexit inet_aton strftime setrlimit socketpair) + atexit inet_aton strftime setrlimit socketpair sigprocmask) # Under Red Hat 4.0 (and many other Linuxes) -lresolv is seriously flaky # and breaks gethostbyname(2). It's better to use the bind stuff in the C @@ -1402,6 +1402,22 @@ const struct method *proto; /* protocol method table */ if ((js = setjmp(restart)) == 1) { +#ifdef HAVE_SIGPROCMASK + /* + * Don't rely on setjmp() to restore the blocked-signal mask. + * It does this under BSD but is required not to under POSIX. + * + * If your Unix doesn't have sigprocmask, better hope it has + * BSD-like behavior. Otherwise you may see fetchmail get + * permanently wedged after a second timeout on a bad read, + * because alarm signals were blocked after the first. + */ + sigset_t allsigs; + + sigfillset(&allsigs); + sigprocmask(SIG_UNBLOCK, &allsigs, NULL); +#endif /* HAVE_SIGPROCMASK */ + if (phase == OPEN_WAIT) error(0, 0, _("timeout after %d seconds waiting to connect to server %s."), |