diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2019-07-30T21·52-0400 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2019-07-30T21·53-0400 |
commit | 9a0855bbb6546e792848e551e79f8efc40782eeb (patch) | |
tree | 3a329095fd6427730daf5cf171f3bc8731463716 /src/libstore | |
parent | 11d853462925d0b57fe956962e07edf5751fd4c3 (diff) |
Don’t rely on EPERM
startProcess does not appear to send the exit code to the helper correctly. Not sure why this is, but it is probably safe to just fallback on all sandbox errors.
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/build.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index dd08ce7d771f..0f71e7511512 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -2320,7 +2320,7 @@ void DerivationGoal::startBuilder() parent. This is only done when sandbox-fallback is set to true (the default). */ if (child == -1 && (errno == EPERM || errno == EINVAL) && settings.sandboxFallback) - _exit(EPERM); + _exit(1); if (child == -1) throw SysError("cloning builder process"); writeFull(builderOut.writeSide.get(), std::to_string(child) + "\n"); @@ -2328,7 +2328,7 @@ void DerivationGoal::startBuilder() }, options); int res = helper.wait(); - if (res == EPERM && settings.sandboxFallback) { + if (res != 0 && settings.sandboxFallback) { useChroot = false; goto fallback; } else if (res != 0) |