projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: fix the shutting up of the shell
[openssl.git]
/
test
/
testlib
/
OpenSSL
/
Test.pm
diff --git
a/test/testlib/OpenSSL/Test.pm
b/test/testlib/OpenSSL/Test.pm
index 1e9730bcdceba081900204d64508b34436b41ff2..2cfb22a6533a9a143a1b9f6f878c76b46cc6778b 100644
(file)
--- a/
test/testlib/OpenSSL/Test.pm
+++ b/
test/testlib/OpenSSL/Test.pm
@@
-356,9
+356,11
@@
sub run {
# In non-verbose, we want to shut up the command interpreter, in case
# it has something to complain about. On VMS, it might complain both
# on stdout and stderr
# In non-verbose, we want to shut up the command interpreter, in case
# it has something to complain about. On VMS, it might complain both
# on stdout and stderr
-
*save_STDOUT = *
STDOUT;
-
*save_STDERR = *
STDERR;
+
my $save_
STDOUT;
+
my $save_
STDERR;
if ($ENV{HARNESS_ACTIVE} && !$ENV{HARNESS_VERBOSE}) {
if ($ENV{HARNESS_ACTIVE} && !$ENV{HARNESS_VERBOSE}) {
+ open $save_STDOUT, '>&', \*STDOUT or die "Can't dup STDOUT: $!";
+ open $save_STDERR, '>&', \*STDERR or die "Can't dup STDERR: $!";
open STDOUT, ">", devnull();
open STDERR, ">", devnull();
}
open STDOUT, ">", devnull();
open STDERR, ">", devnull();
}
@@
-379,9
+381,9
@@
sub run {
if ($ENV{HARNESS_ACTIVE} && !$ENV{HARNESS_VERBOSE}) {
close STDOUT;
close STDERR;
if ($ENV{HARNESS_ACTIVE} && !$ENV{HARNESS_VERBOSE}) {
close STDOUT;
close STDERR;
+ open STDOUT, '>&', $save_STDOUT or die "Can't restore STDOUT: $!";
+ open STDERR, '>&', $save_STDERR or die "Can't restore STDERR: $!";
}
}
- *STDOUT = *save_STDOUT;
- *STDERR = *save_STDERR;
print STDERR "$prefix$display_cmd => $e\n"
if !$ENV{HARNESS_ACTIVE} || $ENV{HARNESS_VERBOSE};
print STDERR "$prefix$display_cmd => $e\n"
if !$ENV{HARNESS_ACTIVE} || $ENV{HARNESS_VERBOSE};