mirror of https://github.com/openssl/openssl.git
Prevent 80-test_cmp_http from accidentally killing perl in error.
If there is an issue with setting up the test environment in this test, pid is not set so stop_server kills the perl process. A guard has been added to prevent this situation. Fixes: #22014 Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22015)
This commit is contained in:
parent
9a41a3c6a4
commit
c499cbc323
|
|
@ -314,7 +314,7 @@ sub start_server {
|
||||||
$server_host = "127.0.0.1" if $server_host eq "0.0.0.0";
|
$server_host = "127.0.0.1" if $server_host eq "0.0.0.0";
|
||||||
}
|
}
|
||||||
unless ($server_port > 0) {
|
unless ($server_port > 0) {
|
||||||
stop_server($server_name, $pid);
|
stop_server($server_name, $pid) if $pid;
|
||||||
print "Cannot get expected output from the $server_name server";
|
print "Cannot get expected output from the $server_name server";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue