On Jun 25, 2015, at 2:30 AM, Alan Burlison <[email protected]> wrote:
> YARN's container-executor.c uses fts(3) to implement the recursive deletion
> of directories in delete_path(). However fts(3) isn't available everywhere
> (e.g. Solaris) as it came originally from BSD and isn't a POSIX API. There is
> an equivalent POSIX API, nftw(3) that's more widely available, including BSD,
> OSX, Linux and Solaris.
>
> fts(3) is an iterative API whereas nftw(3) is callback-based but the two APIs
> provide broadly equivalent functionality.
>
> I have a patch that implements delete_path() using either fts(3) as at
> present, or nftw(3). I can provide that as-is but I'm wondering if it
> wouldn't be better to just switch over to the POSIX nftw(3) API rather than
> having to do compile-time probing. It would be less code and in case of
> changes/bugs in the deletion logic, only one thing to change rather than two.
>
> Thoughts?
POSIX > everything else.
Nuke the old fts code.