lix/src/nix
Eelco Dolstra 93a5ef0516
nix run: Fix chroot execution
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().
2017-08-29 13:21:07 +02:00
..
build.cc StorePathsCommand: Don't build installables 2017-07-14 18:29:07 +02:00
cat.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
command.cc Hide commands that don't have a description 2017-08-29 11:52:55 +02:00
command.hh Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
copy.cc nix copy: Add --no-check-sigs flag 2017-08-16 20:56:02 +02:00
dump-path.cc nix dump-path: Add 2017-05-04 14:21:22 +02:00
edit.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
eval.cc nix eval: Add a --raw flag 2017-05-03 14:08:18 +02:00
hash.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
installables.cc Improve substitution progress indicator 2017-08-16 20:56:02 +02:00
legacy.cc Start of new Nix command-line interface 2016-02-09 21:28:29 +01:00
legacy.hh Fix Darwin build 2016-03-15 12:11:27 +01:00
local.mk Replace readline by linenoise 2017-05-10 18:37:42 +02:00
log.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
ls.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
main.cc nix run: Fix chroot execution 2017-08-29 13:21:07 +02:00
optimise-store.cc nix optimise-store: Add 2017-08-16 20:56:03 +02:00
path-info.cc nix path-info: Show download sizes for binary cache stores 2017-07-14 18:29:10 +02:00
progress-bar.cc Give activities a verbosity level again 2017-08-28 19:13:24 +02:00
progress-bar.hh Improved logging abstraction 2016-04-25 19:18:45 +02:00
repl.cc nix repl: Support printing floating-point numbers 2017-08-09 15:17:29 +02:00
run.cc nix run: Fix chroot execution 2017-08-29 13:21:07 +02:00
search.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
show-config.cc Move code around 2017-04-25 12:07:31 +02:00
sigs.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
verify.cc Give activities a verbosity level again 2017-08-28 19:13:24 +02:00