[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/13: Revert "nix: Guard against removing temporary roots of living pro
From: |
guix-commits |
Subject: |
01/13: Revert "nix: Guard against removing temporary roots of living processes." |
Date: |
Mon, 17 Oct 2022 04:45:52 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit eec920ba93ecb086366576e31b785962fbaf81c2
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Oct 17 09:36:43 2022 +0200
Revert "nix: Guard against removing temporary roots of living processes."
This reverts commit bb0beaecdee1a2315a1269b1746d238c8ab0e699. This
change broke a number of tests that assumed the previous behavior.
---
nix/libstore/gc.cc | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/nix/libstore/gc.cc b/nix/libstore/gc.cc
index f101de92d6..16519116e4 100644
--- a/nix/libstore/gc.cc
+++ b/nix/libstore/gc.cc
@@ -2,7 +2,6 @@
#include "misc.hh"
#include "local-store.hh"
-#include <string>
#include <functional>
#include <queue>
#include <algorithm>
@@ -227,10 +226,10 @@ static void readTempRoots(PathSet & tempRoots, FDs & fds)
//FDPtr fd(new AutoCloseFD(openLockFile(path, false)));
//if (*fd == -1) continue;
- /* Try to acquire a write lock without blocking. This can only
- succeed if the owning process has died, in which case we don't care
- about its temporary roots, or if we are the owning process. */
- if (i.name != std::to_string(getpid()) && lockFile(*fd, ltWrite,
false)) {
+ /* Try to acquire a write lock without blocking. This can
+ only succeed if the owning process has died. In that case
+ we don't care about its temporary roots. */
+ if (lockFile(*fd, ltWrite, false)) {
printMsg(lvlError, format("removing stale temporary roots file
`%1%'") % path);
unlink(path.c_str());
writeFull(*fd, "d");
- branch master updated (094b357783 -> c2cb116032), guix-commits, 2022/10/17
- 11/13: gnu: git-annex: Promote git to propagated input, guix-commits, 2022/10/17
- 01/13: Revert "nix: Guard against removing temporary roots of living processes.",
guix-commits <=
- 04/13: gnu: Add openfst-for-vosk., guix-commits, 2022/10/17
- 03/13: channels: Interpret the 'commit' field of channel as a tag or commit., guix-commits, 2022/10/17
- 05/13: gnu: Add kaldi-for-vosk., guix-commits, 2022/10/17
- 08/13: gnu: Add nerd-dictation., guix-commits, 2022/10/17
- 06/13: gnu: Add vosk-api., guix-commits, 2022/10/17
- 02/13: git: 'update-cached-checkout' returns the commit ID when given a tag., guix-commits, 2022/10/17
- 07/13: gnu: Add python-vosk., guix-commits, 2022/10/17
- 09/13: gnu: Add nerd-dictation/wayland., guix-commits, 2022/10/17
- 10/13: read-print: Recognize 'define-record-type' and 'define-record-type*'., guix-commits, 2022/10/17
- 12/13: gnu: nheko: Do not build api docs., guix-commits, 2022/10/17