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
This commit is contained in:
Eelco Dolstra 2014-09-05 11:43:14 +02:00
parent 9d65287b91
commit e74113a305

View file

@ -10,8 +10,11 @@ use Nix::CopyClosure;
use Nix::Store; use Nix::Store;
no warnings('once'); no warnings('once');
STDERR->autoflush(1);
binmode STDERR, ":encoding(utf8)"; binmode STDERR, ":encoding(utf8)";
my $debug = defined $ENV{NIX_DEBUG_HOOK};
# General operation: # 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" print STDERR "load on " . $_->{machine}->{hostName} . " = " . $_->{load} . "\n"
foreach @available; foreach @available;
} }