guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

171/376: Fix build-remote.pl


From: Ludovic Courtès
Subject: 171/376: Fix build-remote.pl
Date: Wed, 28 Jan 2015 22:04:48 +0000

civodul pushed a commit to tag 1.8
in repository guix.

commit e74113a305edbbf1de6acc2560fbfded56299ed4
Author: Eelco Dolstra <address@hidden>
Date:   Fri Sep 5 11:43:14 2014 +0200

    Fix build-remote.pl
    
    Apparently, turning on utf8 encoding on stderr changes its flushing
    behaviour, causing sendReply to not send anything.
    
    http://hydra.nixos.org/build/13944384
---
 scripts/build-remote.pl.in |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/scripts/build-remote.pl.in b/scripts/build-remote.pl.in
index faf1616..f74ba78 100755
--- a/scripts/build-remote.pl.in
+++ b/scripts/build-remote.pl.in
@@ -10,8 +10,11 @@ use Nix::CopyClosure;
 use Nix::Store;
 no warnings('once');
 
+STDERR->autoflush(1);
 binmode STDERR, ":encoding(utf8)";
 
+my $debug = defined $ENV{NIX_DEBUG_HOOK};
+
 
 # General operation:
 #
@@ -151,7 +154,7 @@ REQ: while (1) {
             }
         }
 
-        if (defined $ENV{NIX_DEBUG_HOOK}) {
+        if ($debug) {
             print STDERR "load on " . $_->{machine}->{hostName} . " = " . 
$_->{load} . "\n"
                 foreach @available;
         }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]