X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/d1f9fb42472323edb17c3ee3cbbfce3557083ceb..92b0827a90559a266bd00662d842b643ac8bdc81:/src/src/transport.c diff --git a/src/src/transport.c b/src/src/transport.c index 33f9a580a..6ec5f3720 100644 --- a/src/src/transport.c +++ b/src/src/transport.c @@ -1281,10 +1281,13 @@ save_errno = 0; yield = FALSE; write_pid = (pid_t)(-1); -(void)fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); -filter_pid = child_open(USS transport_filter_argv, NULL, 077, - &fd_write, &fd_read, FALSE); -(void)fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) & ~FD_CLOEXEC); + { + int bits = fcntl(fd, F_GETFD); + (void)fcntl(fd, F_SETFD, bits | FD_CLOEXEC); + filter_pid = child_open(USS transport_filter_argv, NULL, 077, + &fd_write, &fd_read, FALSE); + (void)fcntl(fd, F_SETFD, bits & ~FD_CLOEXEC); + } if (filter_pid < 0) goto TIDY_UP; /* errno set */ DEBUG(D_transport)