OSDN Git Service

Make lsof 10x faster by caching /proc/net socket info.
authorElliott Hughes <enh@google.com>
Sat, 19 Mar 2016 15:56:09 +0000 (08:56 -0700)
committerRob Landley <rob@landley.net>
Sun, 20 Mar 2016 01:42:36 +0000 (20:42 -0500)
commit4de04e83d7ff621062b8b5456a14f2f313a2639c
treebc9b46bc4e54094e5fa75b0dbf315f7df919d811
parentada3c0876dc99b6b1ef457e06d271d3b933f9dd9
Make lsof 10x faster by caching /proc/net socket info.

I deliberately didn't do this first time round because for me our lsof
is already 10x faster than traditional lsof, and caching means we potentially
give less information about a socket that's created while we're running.
It turns out that traditional lsof caches anyway, so I guess nobody cares.

This also fixes a mistake where lsof used CFG_FREE instead of CFG_TOYBOX_FREE.
toys/pending/lsof.c