aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/local-store.hh
diff options
context:
space:
mode:
authorAndrew Brooks <andrew.brooks@flightaware.com>2022-09-06 17:48:00 -0500
committerAndrew Brooks <andrew.brooks@flightaware.com>2022-09-06 17:48:00 -0500
commit84fe75a12a085c6b4b8d4ac65a048f569de1252b (patch)
tree25f57ac8fc89255f68af7f6476da12ce1558b387 /src/libstore/local-store.hh
parent1f041ac54f43093e4f4df1caa630d491ff51c3f8 (diff)
Keep created temp dirs inside store, but protect from GC
Implements the approach suggested by feedback on PR #6994, where tempdir paths are created in the store (now with an exclusive lock). As part of this work, the currently-broken and unused `createTempDirInStore` function is updated to create an exclusive lock on the temp directory in the store. The GC now makes a non-blocking attempt to lock any store directories that "look like" the temp directories created by this function, and if it can't acquire one, ignores the directory.
Diffstat (limited to 'src/libstore/local-store.hh')
-rw-r--r--src/libstore/local-store.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh
index 70d225be3..bd0ce1fe6 100644
--- a/src/libstore/local-store.hh
+++ b/src/libstore/local-store.hh
@@ -256,7 +256,7 @@ private:
void findRuntimeRoots(Roots & roots, bool censor);
- Path createTempDirInStore();
+ std::pair<Path, AutoCloseFD> createTempDirInStore();
void checkDerivationOutputs(const StorePath & drvPath, const Derivation & drv);