mirror of
https://github.com/NixOS/nix
synced 2025-06-28 05:21:16 +02:00
parent
f3a5930488
commit
d66d9e8425
2 changed files with 8 additions and 2 deletions
|
@ -1970,7 +1970,12 @@ void DerivationGoal::startBuilder()
|
|||
char stack[32 * 1024];
|
||||
pid_t child = clone(childEntry, stack + sizeof(stack) - 8,
|
||||
CLONE_NEWPID | CLONE_NEWNS | CLONE_NEWNET | CLONE_NEWIPC | CLONE_NEWUTS | CLONE_PARENT | SIGCHLD, this);
|
||||
if (child == -1) throw SysError("cloning builder process");
|
||||
if (child == -1) {
|
||||
if (errno == EINVAL)
|
||||
throw SysError("cloning builder process (Linux chroot builds require 3.13 or later)");
|
||||
else
|
||||
throw SysError("cloning builder process");
|
||||
}
|
||||
writeFull(builderOut.writeSide, int2String(child) + "\n");
|
||||
_exit(0);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue