diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2023-03-20 18:06:08 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2023-03-20 18:06:08 +0100 |
commit | 515662ad703cbd7c34df0020947392d233ac82eb (patch) | |
tree | 192036dcb6eec7a1989e2f140b74da3982dfc37d /src/libstore/build | |
parent | 16db8dc96f64a0facbb620907e571f2dfc8e802e (diff) |
Cleanup
Diffstat (limited to 'src/libstore/build')
-rw-r--r-- | src/libstore/build/hook-instance.cc | 5 | ||||
-rw-r--r-- | src/libstore/build/local-derivation-goal.cc | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/libstore/build/hook-instance.cc b/src/libstore/build/hook-instance.cc index ea2ae210e..075ad554f 100644 --- a/src/libstore/build/hook-instance.cc +++ b/src/libstore/build/hook-instance.cc @@ -35,7 +35,10 @@ HookInstance::HookInstance() /* Fork the hook. */ pid = startProcess([&]() { - commonChildInit(fromHook.writeSide.get()); + if (dup2(fromHook.writeSide.get(), STDERR_FILENO) == -1) + throw SysError("cannot pipe standard error into log file"); + + commonChildInit(); if (chdir("/") == -1) throw SysError("changing into /"); diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc index 4f21862ca..3484d2044 100644 --- a/src/libstore/build/local-derivation-goal.cc +++ b/src/libstore/build/local-derivation-goal.cc @@ -1656,7 +1656,7 @@ void LocalDerivationGoal::runChild() try { /* child */ - commonChildInit(-1); + commonChildInit(); try { setupSeccomp(); |