diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-09-14 14:38:36 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-09-14 14:38:36 +0200 |
commit | da1e4fdfb54e0a69dd145180cae1eb7a0afd1b26 (patch) | |
tree | 39673d63e8380a5cd27c1969f3e986912d94c219 /src/libstore/local-store.hh | |
parent | 970366266b8df712f5f9cedb45af183ef5a8357f (diff) |
nix-store -q --roots / --gc --print-roots: Print temporary / in-memory roots
For example,
$ nix-store -q --roots /nix/store/7phd2sav7068nivgvmj2vpm3v47fd27l-patchelf-0.8pre845_0315148
{temp:1}
denotes that the path is only being kept alive by a temporary root
(i.e. /nix/var/nix/temproots/). Similarly,
$ nix-store --gc --print-roots
...
{memory:9} -> /nix/store/094gpjn9f15ip17wzxhma4r51nvsj17p-curl-7.53.1
shows that curl is being used by some process.
Diffstat (limited to 'src/libstore/local-store.hh')
-rw-r--r-- | src/libstore/local-store.hh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh index 4973bd9a9..62a11a94a 100644 --- a/src/libstore/local-store.hh +++ b/src/libstore/local-store.hh @@ -176,7 +176,7 @@ private: typedef std::shared_ptr<AutoCloseFD> FDPtr; typedef list<FDPtr> FDs; - void readTempRoots(PathSet & tempRoots, FDs & fds); + PathSet readTempRoots(FDs & fds); public: @@ -261,7 +261,9 @@ private: void findRoots(const Path & path, unsigned char type, Roots & roots); - void findRuntimeRoots(PathSet & roots); + Roots findRootsNoTemp(); + + PathSet findRuntimeRoots(); void removeUnusedLinks(const GCState & state); |