Hi,

At Thu, 5 Oct 2006 22:26:24 +0900,
Jim Meyering wrote in [ruby-core:09008]:
> However, given sufficient O/S support, the implementation in
> coreutils/src/remove.c is indeed robust and thread-safe.  As of
> coreutils-6.0 (the latest is coreutils-6.3), "rm -r" can remove an
> arbitrarily deep hierarchy in a thread-safe manner on a system with
> support for openat-like functions (Linux-2.6.16 and newer and Solaris 10).

Thank you, I'll consider it later.

> However a robust, efficient, *and* always-thread-safe implementation
> is possible: if the PATH_MAX limitation is encountered, incur the cost
> of a single fork and then perform the remaining operations (including
> f/chdir calls) from a separate process.

I thought about it too.

Another idea suggested by akr is renaming too long path names
to shorter one before traverse.

-- 
Nobu Nakada