X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/568092148bf6ade68174fa1ccf34b8c37d9064e9..b87042e8b8d47ccc76b7873fc8c6afd5ab64508e:/src/src/transport.c diff --git a/src/src/transport.c b/src/src/transport.c index e5a7385b4..2d8426f29 100644 --- a/src/src/transport.c +++ b/src/src/transport.c @@ -3,6 +3,7 @@ *************************************************/ /* Copyright (c) University of Cambridge 1995 - 2018 */ +/* Copyright (c) The Exim Maintainers 2020 */ /* See the file NOTICE for conditions of use and distribution. */ /* General functions concerned with transportation, and generic options for all @@ -1234,10 +1235,10 @@ write_pid = (pid_t)(-1); { int bits = fcntl(tctx->u.fd, F_GETFD); - (void)fcntl(tctx->u.fd, F_SETFD, bits | FD_CLOEXEC); + (void) fcntl(tctx->u.fd, F_SETFD, bits | FD_CLOEXEC); filter_pid = child_open(USS transport_filter_argv, NULL, 077, - &fd_write, &fd_read, FALSE); - (void)fcntl(tctx->u.fd, F_SETFD, bits & ~FD_CLOEXEC); + &fd_write, &fd_read, FALSE, US"transport-filter"); + (void) fcntl(tctx->u.fd, F_SETFD, bits & ~FD_CLOEXEC); } if (filter_pid < 0) goto TIDY_UP; /* errno set */ @@ -1250,7 +1251,7 @@ via a(nother) pipe. While writing to the filter, we do not do the CRLF, smtp dots, or check string processing. */ if (pipe(pfd) != 0) goto TIDY_UP; /* errno set */ -if ((write_pid = exim_fork(US"transport filter writer")) == 0) +if ((write_pid = exim_fork(US"tpt-filter-writer")) == 0) { BOOL rc; (void)close(fd_read); @@ -1274,7 +1275,7 @@ if ((write_pid = exim_fork(US"transport filter writer")) == 0) != sizeof(struct timeval) ) rc = FALSE; /* compiler quietening */ - exim_underbar_exit(0, US"tpt-filter writer"); + exim_underbar_exit(EXIT_SUCCESS); } save_errno = errno; @@ -1958,7 +1959,7 @@ int status; DEBUG(D_transport) debug_printf("transport_pass_socket entered\n"); -if ((pid = exim_fork(US"continued-transport interproc")) == 0) +if ((pid = exim_fork(US"continued-transport-interproc")) == 0) { /* Disconnect entirely from the parent process. If we are running in the test harness, wait for a bit to allow the previous process time to finish, @@ -1966,11 +1967,8 @@ if ((pid = exim_fork(US"continued-transport interproc")) == 0) automatic comparison. */ if ((pid = exim_fork(US"continued-transport")) != 0) - { - DEBUG(D_transport) debug_printf("transport_pass_socket succeeded (final-pid %d)\n", pid); _exit(EXIT_SUCCESS); - } - testharness_pause_ms(1000); /*TTT*/ + testharness_pause_ms(1000); transport_do_pass_socket(transport_name, hostname, hostaddress, id, socket_fd); @@ -1984,7 +1982,6 @@ if (pid > 0) { int rc; while ((rc = wait(&status)) != pid && (rc >= 0 || errno != ECHILD)); - DEBUG(D_transport) debug_printf("transport_pass_socket succeeded (inter-pid %d)\n", pid); return TRUE; } else