1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 22:01:15 +02:00

findRuntimeRoots: Simplify/fix handling of /proc files

Scanning of /proc/<pid>/{exe,cwd} was broken because '{memory:' was
prepended twice. Also, get rid of the whole '{memory:...}' thing
because it's unnecessary, we can just list the file in /proc directly.
This commit is contained in:
Eelco Dolstra 2019-03-14 13:27:16 +01:00
parent 115e2c8c67
commit a3f37d87ea
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
2 changed files with 14 additions and 15 deletions

View file

@ -11,6 +11,7 @@
#include <atomic>
#include <limits>
#include <map>
#include <unordered_set>
#include <memory>
#include <string>
@ -47,7 +48,7 @@ const size_t storePathHashLen = 32; // i.e. 160 bits
const uint32_t exportMagic = 0x4558494e;
typedef std::map<Path, std::set<std::string>> Roots;
typedef std::unordered_map<Path, std::unordered_set<std::string>> Roots;
struct GCOptions