From: Dan Fandrich Date: Wed, 4 Oct 2023 22:14:05 +0000 (-0700) Subject: tests: close the shell used to start sshd X-Git-Tag: curl-8_4_0~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7d55ab1bffa6adb336f809c1687975527671889c;p=thirdparty%2Fcurl.git tests: close the shell used to start sshd This shell isn't needed once sshd starts, so use "exec" so it doesn't stick around. Closes #12032 --- diff --git a/tests/sshserver.pl b/tests/sshserver.pl index 2a69561892..cba8a88ef0 100755 --- a/tests/sshserver.pl +++ b/tests/sshserver.pl @@ -1175,7 +1175,8 @@ if ($sshdid =~ /OpenSSH-Windows/) { #*************************************************************************** # Start the ssh server daemon without forking it # -my $rc = system($cmd); +# "exec" avoids the shell process sticking around +my $rc = system("exec " . $cmd); if($rc == -1) { logmsg "\"$sshd\" failed with: $!\n"; }