From 19d41e40ea75898d510c2ceda6e8429e71a0de3e Mon Sep 17 00:00:00 2001
From: "Eric S. Raymond" <esr@thyrsus.com>
Date: Wed, 18 Mar 1998 16:20:51 +0000
Subject: Make the signal-based wait work again.

svn path=/trunk/; revision=1710
---
 fetchmail.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/fetchmail.c b/fetchmail.c
index 52ffa5f3..9ce2b066 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -563,9 +563,10 @@ int main (int argc, char **argv)
 #ifndef __EMX__
 #ifdef SLEEP_WITH_ALARM		/* not normally on */
 		/* 
-		 * This code stops working under glibc-2, apparently due
-		 * to the change in signal(2) semantics.  John Stracke
-		 * <francis@netscape.com> writes:
+		 * This code stopped working under glibc-2, apparently due
+		 * to the change in signal(2) semantics.  (The siginterrupt
+		 * line, added later, should fix this problem.) John Stracke
+		 * <francis@netscape.com> wrote:
 		 *
 		 * The problem seems to be that, after hitting the interval
 		 * timer while talking to the server, the process no longer
@@ -587,6 +588,7 @@ int main (int argc, char **argv)
 		ntimeout.it_value.tv_sec  = poll_interval;
 		ntimeout.it_value.tv_usec = 0;
 
+		siginterrupt(SIGALRM, 1);
 		setitimer(ITIMER_REAL,&ntimeout,NULL);
 		/* there's a small window here */
 		signal(SIGALRM, donothing);
-- 
cgit v1.2.3