1
0
Fork 0
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:
Eelco Dolstra 2019-02-05 10:49:19 +01:00
parent 92d08c02c8
commit 01d07b1e92
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
9 changed files with 4 additions and 52 deletions

View file

@ -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());