aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-03-18 16:20:51 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-03-18 16:20:51 +0000
commit19d41e40ea75898d510c2ceda6e8429e71a0de3e (patch)
treef788db8dc92e02652c9165aa650bcdf4ffabba38 /fetchmail.c
parent9f0c96e502abdec329bb3c84d457d96875f2ce8c (diff)
downloadfetchmail-19d41e40ea75898d510c2ceda6e8429e71a0de3e.tar.gz
fetchmail-19d41e40ea75898d510c2ceda6e8429e71a0de3e.tar.bz2
fetchmail-19d41e40ea75898d510c2ceda6e8429e71a0de3e.zip
Make the signal-based wait work again.
svn path=/trunk/; revision=1710
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c8
1 files 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);