summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/src/exim.c3
-rw-r--r--src/src/transport.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/src/exim.c b/src/src/exim.c
index f7f8b251a..ae958af1c 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;
}
diff --git a/src/src/transport.c b/src/src/transport.c
index 142fede07..cd5e8d319 100644
--- a/src/src/transport.c
+++ b/src/src/transport.c
@@ -265,6 +265,7 @@ for (int i = 0; i < 100; i++)
}
else /* Timeout wanted. */
{
+ sigalrm_seen = FALSE;
ALARM(local_timeout);
rc = tpt_write(fd, block, len, more, tctx->options);
save_errno = errno;