summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2020-03-18 12:33:24 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2020-03-18 12:33:24 +0000
commit3a2adc82d165fccae92f6a693ce5ddba10d371d4 (patch)
tree07a263e01e9323c2b56f506f8cc5465c1d65c922 /src
parent96c8151125ceb98ed52c0089f6401e6ba05bb41e (diff)
fixes
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;