]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: test-http-payload - Properly exit child process.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Sun, 12 Apr 2020 17:16:14 +0000 (19:16 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 22 May 2020 08:42:33 +0000 (08:42 +0000)
src/lib-http/test-http-payload.c

index b0017f2a574cbc71b6e355ad1952b942fcec63ec..1a01898b6fb3c45141d607e8599e42e615f40d39 100644 (file)
@@ -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