- if ( write(pfd[pipe_write], (void *)&rc, sizeof(BOOL))
- != sizeof(BOOL)
- || write(pfd[pipe_write], (void *)&save_errno, sizeof(int))
- != sizeof(int)
- || write(pfd[pipe_write], (void *)&tctx->addr->more_errno, sizeof(int))
- != sizeof(int)
- || write(pfd[pipe_write], (void *)&tctx->addr->delivery_usec, sizeof(int))
- != sizeof(int)
- )
- rc = FALSE; /* compiler quietening */
- _exit(0);
+ errno = 0;
+ for (int retries = 10;;)
+ {
+ if ( os_pipe_write(pfd[pipe_write], (void *)&rc, sizeof(BOOL))
+ != sizeof(BOOL)
+ || os_pipe_write(pfd[pipe_write], (void *)&save_errno, sizeof(int))
+ != sizeof(int)
+ || os_pipe_write(pfd[pipe_write], (void *)&tctx->addr->more_errno, sizeof(int))
+ != sizeof(int)
+ || os_pipe_write(pfd[pipe_write], (void *)&tctx->addr->delivery_usec, sizeof(int))
+ != sizeof(int)
+ )
+ if (errno == EINTR && --retries > 0)
+ continue;
+ else
+ rc = FALSE; /* compiler quietening */
+ break;
+ }
+ exim_underbar_exit(0);