From ff928457939e0533e4593252914f3f7735de2f15 Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Fri, 21 Mar 2025 20:58:57 +0100 Subject: [PATCH] Fix a visual glitch in test_cmp_http.t Kill the shell process after the Mock server is running, to prevent the shell from printing an error message when the Mock server is finally killed. Reviewed-by: Todd Short Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/27158) --- test/recipes/80-test_cmp_http.t | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/recipes/80-test_cmp_http.t b/test/recipes/80-test_cmp_http.t index c704cc758e9..8ea33d90c09 100644 --- a/test/recipes/80-test_cmp_http.t +++ b/test/recipes/80-test_cmp_http.t @@ -274,6 +274,7 @@ sub start_mock_server { print "Pid is: $pid\n"; if ($server_port == 0) { # Find out the actual server port + my $pid0 = $pid; while (<$server_fh>) { print "Server output: $_"; next if m/using section/; @@ -281,6 +282,11 @@ sub start_mock_server { ($server_port, $pid) = ($1, $2) if /^ACCEPT\s.*:(\d+) PID=(\d+)$/; last; # Do not loop further to prevent hangs on server misbehavior } + if ($pid0 != $pid) { + # kill the shell process + kill('KILL', $pid0); + waitpid($pid0, 0); + } } unless ($server_port > 0) { stop_mock_server($pid); -- 2.47.2