From: Stephan Bosch Date: Mon, 13 Apr 2020 11:26:04 +0000 (+0200) Subject: lib-smtp: test-smtp-payload - Properly exit child process. X-Git-Tag: 2.3.13~648 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=04097a659ff83a57782b719cddf90706088c294c;p=thirdparty%2Fdovecot%2Fcore.git lib-smtp: test-smtp-payload - Properly exit child process. --- diff --git a/src/lib-smtp/test-smtp-payload.c b/src/lib-smtp/test-smtp-payload.c index b9c6a4bd20..7f874d8a10 100644 --- a/src/lib-smtp/test-smtp-payload.c +++ b/src/lib-smtp/test-smtp-payload.c @@ -892,22 +892,27 @@ test_run_client_server( io_loop_run(ioloop); test_server_deinit(); io_loop_destroy(&ioloop); + i_close_fd(&fd_listen); - } else { - if (debug) - i_debug("client: PID=%s", my_pid); - i_set_failure_prefix("CLIENT: "); - i_close_fd(&fd_listen); - /* parent: client */ - ioloop = io_loop_create(); - test_client_init(); - client_init(protocol, client_set); - io_loop_run(ioloop); - test_client_deinit(); - io_loop_destroy(&ioloop); - bind_port = 0; - test_server_kill(); + + test_files_deinit(); + lib_deinit(); + exit(1); } + i_close_fd(&fd_listen); + + if (debug) + i_debug("client: PID=%s", my_pid); + i_set_failure_prefix("CLIENT: "); + /* parent: client */ + ioloop = io_loop_create(); + test_client_init(); + client_init(protocol, client_set); + io_loop_run(ioloop); + test_client_deinit(); + io_loop_destroy(&ioloop); + bind_port = 0; + test_server_kill(); } static void