Hi,

> The only argument in favor of readdir_r() was thread safety because some
> readdir() implementations used to return a pointer to a static buffer,
> but was never the case for FreeBSD.

True, but most software isn't written for FreeBSD specifically, and some 
intends to be more or less portable.

> Our readdir() is thread-safe as long as you don't have multiple threads 
> operating on the same DIR.

Only the latest POSIX release (Issue 8, 2024) amended the wording to 
unequivocally require that, even if previous versions could be considered to 
hint at that.  I did not survey some other open-source implementations, maybe 
in practice they all meet that requirement.  But even if they do, we don't 
really know about proprietary systems.  Also, readdir_r() has just been 
obsoleted in Issue 8, only a year ago, so again I don't understand the hurry in 
actually *removing* it unless there is a clear security issue or it is actively 
obstructing some other grand plan.  Hence, I'll point again to 
https://reviews.freebsd.org/D52474.

Thanks and regards.

-- 
Olivier Certner

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to