1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 14:21:48 +02:00

* Acquire a global GC lock to prevent new temporary root files from

being created after the garbage collector has read the temproots
  directory.  This blocks the creation of new processes, but the
  garbage collector could periodically release the GC lock to allow
  them to run.
This commit is contained in:
Eelco Dolstra 2005-01-31 22:23:49 +00:00
parent 89c9bc11ab
commit 32fa82a56a
3 changed files with 36 additions and 19 deletions

View file

@ -6,6 +6,8 @@ outPath2=$($TOP/src/nix-store/nix-store -q $storeExpr2)
ls -l test-tmp/state/temproots
ln -s $storeExpr2 "$NIX_LOCALSTATE_DIR"/nix/gcroots/foo2
# Start build #1 in the background. It starts immediately.
$TOP/src/nix-store/nix-store -rvv "$storeExpr1" &
pid1=$!
@ -31,4 +33,5 @@ wait $pid2
cat $outPath1/foobar
cat $outPath1/input-2/bar
# Build #2 should have failed because its derivation got garbage collected.
cat $outPath2/foobar