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
c3f5e73b
Commit
c3f5e73b
authored
Mar 06, 2003
by
Robert Ricci
Browse files
Added a way for callers to get the ouput of a command run with
ExecQuiet
parent
9375ede0
Changes
1
Hide whitespace changes
Inline
Side-by-side
install/libinstall.pm
View file @
c3f5e73b
...
@@ -318,7 +318,9 @@ sub CreateFileFatal($@) {
...
@@ -318,7 +318,9 @@ sub CreateFileFatal($@) {
#
#
# Execute a program, hiding its stdout and stderr from the user, but saving
# Execute a program, hiding its stdout and stderr from the user, but saving
# them for later use. Returns the exit value of the program.
# them for later use. Returns the exit value of the program if used in scalar
# context, or an array composed of the exit status and output if used in array
# context.
#
#
sub
ExecQuiet
(@)
{
sub
ExecQuiet
(@)
{
my
@commnads
=
@_
;
my
@commnads
=
@_
;
...
@@ -339,7 +341,11 @@ sub ExecQuiet(@) {
...
@@ -339,7 +341,11 @@ sub ExecQuiet(@) {
@
libinstall::
lastExecOutput
=
@output
;
@
libinstall::
lastExecOutput
=
@output
;
$
libinstall::
lastCommand
=
$commandstr
;
$
libinstall::
lastCommand
=
$commandstr
;
return
$exit_value
;
if
(
wantarray
)
{
return
(
$exit_value
,
@output
);
}
else
{
return
$exit_value
;
}
}
}
#
#
...
...
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