Paul Eggert <[EMAIL PROTECTED]> wrote: ... > As a result of this patch, getcwd is limited only by available memory > on hosts like Solaris that support AT_FDCWD.
But it has an unwelcome side effect: now, even on GNU libc systems, this replacement getcwd will end up opening "..", then "../..", etc. all the way up to "/", whereas the getcwd in libc.so just copies the symlink value from /proc/self/cwd. Of course, the /proc/self/cwd approach doesn't work for directory names that are longer than PATH_MAX. The combination of increased efficiency and no need for a file descriptor are compelling arguments to use a wrapper around the system-supplied getcwd, when possible. Or at least to try the /proc/self/cwd trick before resorting to the more expensive, robust code. What do you think? _______________________________________________ Bug-coreutils mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/bug-coreutils
