From e74113a305edbbf1de6acc2560fbfded56299ed4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 5 Sep 2014 11:43:14 +0200 Subject: [PATCH] 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 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/build-remote.pl.in b/scripts/build-remote.pl.in index faf1616e9..f74ba7886 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; }