[PATCH] lsof.c: a very simple lsof implementation

Tito farmatito at tiscali.it
Wed Mar 21 08:08:00 UTC 2012


On Tuesday 20 March 2012 22:30:20 Sven Oliver Moll wrote:
> Hello again,
> 
> I did a complete rework on my lsof implementation, focusing on robustness,
> memory consumption and lowering the calls of malloc()/free().
> 
> Trying to use recurive_action() didn't work out as expected, the action 
> handlers added more code than the removal of the simple 
> opendir()/readdir()-loop would have saved.
> 
> Now as a patch for integration into busybox-1.19.4. I hope this is of any 
> use to you.
> 
> 
> Greetings,
> SvOlli
> 

Hi,
maybe you can simplify it by using thefunctions in libbb/procps.c.
Just an idea, untested.

Ciao,
Tito


More information about the busybox mailing list