list-runtime-roots: Do not use 'lsof'.
authorLudovic Courtès <ludo@gnu.org>
Sun, 12 Nov 2017 21:02:22 +0000 (22:02 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sun, 12 Nov 2017 21:42:17 +0000 (22:42 +0100)
commitb8f59cdc20e9d83ce63523ef917e95fcee07f134
tree15ebea7f4b9c0c170f68760ed9e2807cd6863e9e
parent6a98b9f34e6190a2e1d11bedd5853aa94cf25ca7
list-runtime-roots: Do not use 'lsof'.

This makes things a bit faster (0.8s instead of 1.4s on my laptop).

* nix/scripts/list-runtime-roots.in (lsof-roots): Remove.
(proc-fd-roots): Return the empty list when 'scandir' returns #f.
(referenced-files): New procedure.
Use it at the top level.
nix/scripts/list-runtime-roots.in