test driver.pl: don't redirect to STDOUT of interactive GDB

This commit is contained in:
Geza Lore 2023-10-22 00:55:20 +01:00
parent 978d900e36
commit 82565690c7

View File

@ -1658,10 +1658,14 @@ sub _run {
$SIG{ALRM} = 'DEFAULT';
$SIG{CHLD} = 'DEFAULT';
# Logging
open(STDOUT, ">&CHILDWR") or croak "%Error: Can't redirect stdout, stopped";
open(STDERR, ">&STDOUT") or croak "%Error: Can't dup stdout, stopped";
autoflush STDOUT 1;
autoflush STDERR 1;
if (!$opt_gdb) {
# Redirecting the stdout of GDB prevents output syntax colors
# and the use of the TUI, so only redirect when not --gdb
open(STDOUT, ">&CHILDWR") or croak "%Error: Can't redirect stdout, stopped";
open(STDERR, ">&STDOUT") or croak "%Error: Can't dup stdout, stopped";
autoflush STDOUT 1;
autoflush STDERR 1;
}
system "$command";
my $status = $?;
if (($status & 127) == 4 # SIGILL