X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Ftransports%2Fsmtp.c;h=14eb76921edf43e175dbdd526012c06a50e8dcbd;hb=60272099eb6529d6d748c7dd04412b35c09f37e2;hp=0bfab53882e0bc3c8544a1c4955dc05297f2fe9b;hpb=d2aa036bf831a28b2e0208e6b8385eeb5453cd39;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index 0bfab5388..14eb76921 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -2757,6 +2757,7 @@ if (continue_hostname && continue_sequence == 1) address_item * addr; sx.peer_offered = smtp_peer_options; + sx.pending_MAIL = FALSE; sx.ok = TRUE; sx.next_addr = NULL; @@ -3424,14 +3425,17 @@ propagate it from the initial int pid = fork(); if (pid > 0) /* parent */ { + waitpid(pid, NULL, 0); tls_close(FALSE, FALSE); (void)close(sx.inblock.sock); continue_transport = NULL; continue_hostname = NULL; return yield; } - else if (pid == 0) /* child */ + else if (pid == 0) /* child; fork again to disconnect totally */ { + if ((pid = fork())) + _exit(pid ? EXIT_FAILURE : EXIT_SUCCESS); smtp_proxy_tls(sx.buffer, sizeof(sx.buffer), pfd[0], sx.ob->command_timeout); exim_exit(0); }