diff options
author | Shea Levy <shea@shealevy.com> | 2015-02-04 11:46:38 -0500 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-02-04 18:15:56 +0100 |
commit | d66d9e8425d52cc698851e2e85bd56aa96f45fc9 (patch) | |
tree | 821dead4a5a6d356dd65d81513649be45ce8a774 /src/libstore | |
parent | f3a5930488e4a25de33d9aacc2e14ae614614b5e (diff) |
Require linux 3.13 or later for chroot
Fixes #453
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/build.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index e0398e2fb..259324734 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -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); }); |