[PATCH] lsof: correct check for symbolic link

Ralf Friedl Ralf.Friedl at online.de
Thu Jun 20 11:07:28 UTC 2013


Laurent Bercot wrote:
>> its existence does not guarantee it will be correctly populated.  in his case,
>> he's seeing DT_UNKNOWN in the field which means the lstat fallback is needed.
>   Hence the need for a build-time test to *run* a program that creates a
> few file types in a temp directory and then checks whether the corresponding
> d_type matches. This the point I was making to Rick a few days ago.
The result may depend on the filesystem being used, so the result 
doesn't even predict what will happen in another directory on the same host.

The simple test for DT_UNKNOWN just adds a few extra bytes and uses the 
field if it contains valid information.


More information about the busybox mailing list