Unverified Commit 6d42df6a authored by boklm's avatar boklm
Browse files

Bug 40203: autoflush STDOUT in sign-nightly

We save logs of the sign-nightly script by redirecting STDOUT and STDERR
to a file. However, when the output is not a terminal, STDOUT will have
buffering by default, but STDERR will not, which results in some lines
being written in the wrong order in our log file. To avoid that we
enable autoflush on STDOUT.
parent fe933fc3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ use JSON;
umask(0022);
$ENV{"LC_ALL"} = "C";
setlocale(LC_ALL, "C");
# autoflush STDOUT to have logs in the right order (see bug #40203)
STDOUT->autoflush(1);

sub exit_error {
    print STDERR "Error: ", $_[0], "\n";