Closed baryluk closed 7 months ago
That is indeed suboptimal. And a interesting use-case if there is so much activity in the tomb?
Best would be if lsof
could offer the information tomb wants to present, but don't know from the top of my head if that is possible.
If not then your proposed idea should help :)
lsof
can offer the information directly (which may of course be already obsolete): lsof +D "$tombmount" -F Lc
.
Produces the following example output:
p1246
czsh
Lomnius
p124880
cSciTE
Lomnius
or lsof +D "$tombmount" -F Lc0
p1246czshLomnius
p124880cSciTELomnius
Could be in theory a replacement for the current structure. But I'm also not sure how to parse the output effectively in shell, but makes field identification really easy. awk
would be the obvious candidate.. hm
Edit: Or just simply use the lsof
output...
This mostly happens when the
tomb ps
itself, or other frequently forking processes are operating in that directory (i.e. as a current working directory).When there are processes there, but they are idle and not doing fork/execve/exit, it mostly looks ok.
Looks like you should ignore error to open a file that might be gone by the time you try to open. Also rest of the output looks like some garbage from /etc/passwd or /etc/groups
Should look like this:
Tomb 2.10.0 - a strong and gentle undertaker for your secrets