Skip to content

Commit aa1389b

Browse files
Make sure output buffers are flushed before writing exit code
This seems to work when calling bash again. Otherwise, we can get something like: This is half a liEXIT=123
1 parent 30ca986 commit aa1389b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

regression/test.pl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ ($$$$$)
5353
}
5454
}
5555

56-
open my $FH, ">>$name/$output";
57-
print $FH "EXIT=$exit_value\n";
58-
print $FH "SIGNAL=$signal_num\n";
59-
close $FH;
56+
system("bash", "-c", "cd '$name' ; echo '\nEXIT=$exit_value\nSIGNAL=$signal_num\n' >> '$output'");
6057

6158
if($signal_num == 2) {
6259
print "\nProgram under test interrupted; stopping\n";

0 commit comments

Comments
 (0)