From ad790022fddd5627eb237b95acae210c9b00c3de Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 12 Dec 2014 13:41:00 +0100 Subject: [PATCH] Doh --- src/libstore/build.cc | 2 +- src/libutil/util.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 36436d7eb..127fcfd65 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -1918,7 +1918,7 @@ void DerivationGoal::startBuilder() options.allowVfork = !buildUser.enabled(); pid = startProcess([&]() { runChild(); - }); + }, options); /* parent */ pid.setSeparatePG(true); diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 5895e7200..a91cf26aa 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -850,7 +850,7 @@ void killUser(uid_t uid) } _exit(0); - }); + }, options); int status = pid.wait(true); if (status != 0) @@ -885,7 +885,7 @@ static pid_t doFork(bool allowVfork, std::function fun) pid_t startProcess(std::function fun, const ProcessOptions & options) { auto wrapper = [&]() { - _writeToStderr = 0; + if (!options.allowVfork) _writeToStderr = 0; try { #if __linux__ if (options.dieWithParent && prctl(PR_SET_PDEATHSIG, SIGKILL) == -1)