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/hook-instance.cc | |
parent | 16db8dc96f64a0facbb620907e571f2dfc8e802e (diff) |
Cleanup
Diffstat (limited to 'src/libstore/build/hook-instance.cc')
-rw-r--r-- | src/libstore/build/hook-instance.cc | 5 |
1 files changed, 4 insertions, 1 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 /"); |