[tor-commits] [tor-browser-build/master] Bug 40203: autoflush STDOUT in sign-nightly

gk at torproject.org gk at torproject.org
Thu Jan 14 08:05:16 UTC 2021


commit 6d42df6a346b4286602a2a7a406be0d77bd5a9ae
Author: Nicolas Vigier <boklm at torproject.org>
Date:   Wed Jan 13 21:50:35 2021 +0100

    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.
---
 tools/signing/nightly/sign-nightly | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/signing/nightly/sign-nightly b/tools/signing/nightly/sign-nightly
index c7efd8e..2009fbc 100755
--- a/tools/signing/nightly/sign-nightly
+++ b/tools/signing/nightly/sign-nightly
@@ -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";



More information about the tor-commits mailing list