mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Revert "Restore parent mount namespace before executing a child process"
This reverts commit a0ef21262f
. 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.
This commit is contained in:
parent
92d08c02c8
commit
01d07b1e92
9 changed files with 4 additions and 52 deletions
|
@ -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());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue