Commit e4a38b1d authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Fix up call to exec to avoid extra shell process.

parent 31090a2d
#!/usr/bin/perl -wT #!/usr/bin/perl -wT
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2000-2004 University of Utah and the Flux Group. # Copyright (c) 2000-2005 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
use English; use English;
...@@ -271,24 +271,25 @@ if ($child_pid) { ...@@ -271,24 +271,25 @@ if ($child_pid) {
# We tell ssh to allocate a tty so that we can kill it with TERM and have # We tell ssh to allocate a tty so that we can kill it with TERM and have
# everything die off properly. # everything die off properly.
# #
my $cmd = "$SSH -t -t -1 -F /dev/null " . my @cmdargs = ("$SSH", "-1", "-F", "/dev/null",
"-host $CONTROL $TB/sbin/linktest.proxy "; "-host", $CONTROL, "$TB/sbin/linktest.proxy");
$cmd .= " -d $debug" push(@cmdargs, ("-d", "$debug"))
if ($debug); if ($debug);
$cmd .= " -t $timeout" push(@cmdargs, ("-t", "$timeout"))
if (defined($timeout)); if (defined($timeout));
$cmd .= " -o $output" push(@cmdargs, ("-o", "$output"))
if (defined($output)); if (defined($output));
$cmd .= " -l " . (defined($level) ? $level : $linktest_level); push(@cmdargs, "-l");
$cmd .= " -g " . $unix_gidname; push(@cmdargs, (defined($level) ? $level : $linktest_level));
$cmd .= " -u $dbuid"; push(@cmdargs, ("-g", $unix_gidname));
$cmd .= " -e $pid/$eid"; push(@cmdargs, ("-u", $dbuid));
push(@cmdargs, ("-e", "$pid/$eid"));
print "Running '$cmd'\n" print "Running '@cmdargs'\n"
if ($debug); if ($debug);
# For sshtb # For sshtb
$UID=0; $UID=0;
exec($cmd); exec(@cmdargs);
die("*** $0:\n". die("*** $0:\n".
" Could not exec run_linktest.pl\n"); " Could not exec run_linktest.pl\n");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment