1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-05 12:21:48 +02:00
This commit is contained in:
Eelco Dolstra 2023-03-20 18:06:08 +01:00
parent 16db8dc96f
commit 515662ad70
4 changed files with 7 additions and 8 deletions

View file

@ -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 /");