git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
OpenSSL: clear error stack before avery I/O operation
[exim.git]
/
src
/
src
/
transport.c
diff --git
a/src/src/transport.c
b/src/src/transport.c
index e5a7385b439b2062282fe2330bd96fad5bbbfca3..2d8426f297acfadfe03dfe432e826ddc8261c77e 100644
(file)
--- a/
src/src/transport.c
+++ b/
src/src/transport.c
@@
-3,6
+3,7
@@
*************************************************/
/* Copyright (c) University of Cambridge 1995 - 2018 */
*************************************************/
/* 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
/* 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);
{
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,
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 */
}
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 */
smtp dots, or check string processing. */
if (pipe(pfd) != 0) goto TIDY_UP; /* errno set */
-if ((write_pid = exim_fork(US"t
ransport filter
writer")) == 0)
+if ((write_pid = exim_fork(US"t
pt-filter-
writer")) == 0)
{
BOOL rc;
(void)close(fd_read);
{
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 */
!= sizeof(struct timeval)
)
rc = FALSE; /* compiler quietening */
- exim_underbar_exit(
0, US"tpt-filter writer"
);
+ exim_underbar_exit(
EXIT_SUCCESS
);
}
save_errno = errno;
}
save_errno = errno;
@@
-1958,7
+1959,7
@@
int status;
DEBUG(D_transport) debug_printf("transport_pass_socket entered\n");
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,
{
/* 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)
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);
_exit(EXIT_SUCCESS);
- }
- testharness_pause_ms(1000); /*TTT*/
+ testharness_pause_ms(1000);
transport_do_pass_socket(transport_name, hostname, hostaddress,
id, socket_fd);
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));
{
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
return TRUE;
}
else