diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-02-05T09·49+0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-02-05T09·49+0100 |
commit | 01d07b1e92c298f729a73705907b2987da9a4d0c (patch) | |
tree | a58d0e6ad9d7b1586346cb1f155d9b79aa15bb4d /src/nix-build/nix-build.cc | |
parent | 92d08c02c84be34ec0df56ed718526c382845d1a (diff) |
Revert "Restore parent mount namespace before executing a child process"
This reverts commit a0ef21262f4d5652bfb65cfacaec01d89c475a93. This doesn't work in 'nix run' and nix-shell because setns() fails in multithreaded programs, and Boehm GC mark threads are uncancellable. Fixes #2646.
Diffstat (limited to 'src/nix-build/nix-build.cc')
-rwxr-xr-x | src/nix-build/nix-build.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index 11ea3b1f7ae1..618895d387d4 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -401,6 +401,8 @@ static void _main(int argc, char * * argv) } else env[var.first] = var.second; + restoreAffinity(); + /* Run a shell using the derivation's environment. For convenience, source $stdenv/setup to setup additional environment variables and shell functions. Also don't @@ -444,9 +446,7 @@ static void _main(int argc, char * * argv) auto argPtrs = stringsToCharPtrs(args); - restoreAffinity(); restoreSignals(); - restoreMountNamespace(); execvp(shell.c_str(), argPtrs.data()); |