Skip to content

Commit 99fe4b2

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 968ac2a commit 99fe4b2

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
@@ -43,10 +43,7 @@ ($$$$$)
4343
}
4444
}
4545

46-
open my $FH, ">>$name/$output";
47-
print $FH "EXIT=$exit_value\n";
48-
print $FH "SIGNAL=$signal_num\n";
49-
close $FH;
46+
system("bash", "-c", "cd '$name' ; echo '\nEXIT=$exit_value\nSIGNAL=$signal_num\n' >> '$output'");
5047

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

0 commit comments

Comments
 (0)