forked from lix-project/lix
93a5ef0516
Running "nix run" with a diverted store, e.g. $ nix run --store local?root=/tmp/nix nixpkgs.hello stopped working when Nix became multithreaded, because unshare(CLONE_NEWUSER) doesn't work in multithreaded processes. The obvious solution is to terminate all other threads first, but 1) there is no way to terminate Boehm GC marker threads; and 2) it appears that the kernel has a race where unshare(CLONE_NEWUSER) will still fail for some indeterminate amount of time after joining other threads. So instead, "nix run" will now exec() a single-threaded helper ("nix __run_in_chroot") that performs the actual unshare()/chroot()/exec(). |
||
---|---|---|
.. | ||
build.cc | ||
cat.cc | ||
command.cc | ||
command.hh | ||
copy.cc | ||
dump-path.cc | ||
edit.cc | ||
eval.cc | ||
hash.cc | ||
installables.cc | ||
legacy.cc | ||
legacy.hh | ||
local.mk | ||
log.cc | ||
ls.cc | ||
main.cc | ||
optimise-store.cc | ||
path-info.cc | ||
progress-bar.cc | ||
progress-bar.hh | ||
repl.cc | ||
run.cc | ||
search.cc | ||
show-config.cc | ||
sigs.cc | ||
verify.cc |