Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
e4a38b1d
Commit
e4a38b1d
authored
Oct 18, 2005
by
Leigh B. Stoller
Browse files
Fix up call to exec to avoid extra shell process.
parent
31090a2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
event/linktest/linktest_control.in
View file @
e4a38b1d
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-200
4
University of Utah and the Flux Group.
# Copyright (c) 2000-200
5
University of Utah and the Flux Group.
# All rights reserved.
#
use
English
;
...
...
@@ -271,24 +271,25 @@ if ($child_pid) {
# We tell ssh to allocate a tty so that we can kill it with TERM and have
# everything die off properly.
#
my
$
cmd
=
"
$SSH
-t -t -1 -F
/dev/null
"
.
"
-host
$CONTROL
$TB
/sbin/linktest.proxy
";
$cmd
.=
"
-d
$debug
"
my
@
cmd
args
=
(
"
$SSH
",
"
-1
",
"
-F
",
"
/dev/null
",
"
-host
",
$CONTROL
,
"
$TB
/sbin/linktest.proxy
"
)
;
push
(
@cmdargs
,
("
-d
",
"
$debug
"
))
if
(
$debug
);
$cmd
.=
"
-t
$timeout
"
push
(
@cmdargs
,
("
-t
",
"
$timeout
"
))
if
(
defined
(
$timeout
));
$cmd
.=
"
-o
$output
"
push
(
@cmdargs
,
("
-o
",
"
$output
"
))
if
(
defined
(
$output
));
$cmd
.=
"
-l
"
.
(
defined
(
$level
)
?
$level
:
$linktest_level
);
$cmd
.=
"
-g
"
.
$unix_gidname
;
$cmd
.=
"
-u
$dbuid
";
$cmd
.=
"
-e
$pid
/
$eid
";
push
(
@cmdargs
,
"
-l
");
push
(
@cmdargs
,
(
defined
(
$level
)
?
$level
:
$linktest_level
));
push
(
@cmdargs
,
("
-g
",
$unix_gidname
));
push
(
@cmdargs
,
("
-u
",
$dbuid
));
push
(
@cmdargs
,
("
-e
",
"
$pid
/
$eid
"));
print
"
Running '
$
cmd
'
\n
"
print
"
Running '
@
cmd
args
'
\n
"
if
(
$debug
);
# For sshtb
$UID
=
0
;
exec
(
$
cmd
);
exec
(
@
cmd
args
);
die
("
*** $0:
\n
"
.
"
Could not exec run_linktest.pl
\n
");
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment