Browse Source

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
Dan Fandrich 6 months ago
parent
commit
7d55ab1bff
1 changed files with 2 additions and 1 deletions
  1. 2 1
      tests/sshserver.pl

+ 2 - 1
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";
 }