summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/src/exim.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/src/exim.c b/src/src/exim.c
index 4e4b6bb75..5e2f43799 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -309,6 +309,7 @@ milliwait(struct itimerval *itval)
{
sigset_t sigmask;
sigset_t old_sigmask;
+int save_errno = errno;
if (itval->it_value.tv_usec < 50 && itval->it_value.tv_sec == 0)
return;
@@ -322,6 +323,8 @@ if (setitimer(ITIMER_REAL, itval, NULL) < 0) /* Start timer */
(void)sigdelset(&sigmask, SIGALRM); /* Remove SIGALRM */
(void)sigsuspend(&sigmask); /* Until SIGALRM */
(void)sigprocmask(SIG_SETMASK, &old_sigmask, NULL); /* Restore mask */
+errno = save_errno;
+sigalrm_seen = FALSE;
}