]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: test-smtp-payload - Properly exit child process.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Mon, 13 Apr 2020 11:26:04 +0000 (13:26 +0200)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Mon, 25 May 2020 15:29:02 +0000 (17:29 +0200)
src/lib-smtp/test-smtp-payload.c

index b9c6a4bd20cf2839a78b39e2d2131b9efde2b166..7f874d8a1049c26df72ceed15322e1fe2bfc0d29 100644 (file)
@@ -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