From: Stephan Bosch Date: Sun, 12 Apr 2020 17:16:14 +0000 (+0200) Subject: lib-http: test-http-payload - Properly exit child process. X-Git-Tag: 2.3.13~720 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a54fcb5649e140e487c5d9e48d88ede91d9fab13;p=thirdparty%2Fdovecot%2Fcore.git lib-http: test-http-payload - Properly exit child process. --- diff --git a/src/lib-http/test-http-payload.c b/src/lib-http/test-http-payload.c index b0017f2a57..1a01898b6f 100644 --- a/src/lib-http/test-http-payload.c +++ b/src/lib-http/test-http-payload.c @@ -1628,22 +1628,26 @@ 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_nested = NULL; - ioloop_nested_depth = 0; - ioloop = io_loop_create(); - client_init(client_set); - io_loop_run(ioloop); - test_client_deinit(); - io_loop_destroy(&ioloop); - 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_nested = NULL; + ioloop_nested_depth = 0; + ioloop = io_loop_create(); + client_init(client_set); + io_loop_run(ioloop); + test_client_deinit(); + io_loop_destroy(&ioloop); + test_server_kill(); } static void