diff options
Diffstat (limited to 'nix/libstore/build.cc')
-rw-r--r-- | nix/libstore/build.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc index 4376a8322c..348b3bdb0f 100644 --- a/nix/libstore/build.cc +++ b/nix/libstore/build.cc @@ -374,8 +374,6 @@ void Goal::trace(const format & f) /* Common initialisation performed in child processes. */ static void commonChildInit(Pipe & logPipe) { - restoreAffinity(); - /* Put the child in a separate session (and thus a separate process group) so that it has no controlling terminal (meaning that e.g. ssh cannot open /dev/tty) and it doesn't receive @@ -1974,6 +1972,12 @@ void DerivationGoal::initChild() try { /* child */ + _writeToStderr = 0; + + restoreAffinity(); + + commonChildInit(builderOut); + #if CHROOT_ENABLED if (useChroot) { /* Initialise the loopback interface. */ @@ -2092,8 +2096,6 @@ void DerivationGoal::initChild() } #endif - commonChildInit(builderOut); - if (chdir(tmpDir.c_str()) == -1) throw SysError(format("changing into `%1%'") % tmpDir); |