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
This commit is contained in:
Dan Fandrich 2023-10-04 15:14:05 -07:00
Родитель 3ef3eaa27e
Коммит 7d55ab1bff
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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";
}