[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gnulib] Re: getcwd fixes for bugs in glibc, Solaris, OpenBSD, ...
From: |
Jim Meyering |
Subject: |
[bug-gnulib] Re: getcwd fixes for bugs in glibc, Solaris, OpenBSD, ... |
Date: |
Fri, 26 Nov 2004 18:56:09 +0100 |
Paul Eggert <address@hidden> 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-gnulib] getcwd fixes for bugs in glibc, Solaris, OpenBSD, ..., Paul Eggert, 2004/11/25
- [bug-gnulib] Re: getcwd fixes for bugs in glibc, Solaris, OpenBSD, ..., Jim Meyering, 2004/11/25
- [bug-gnulib] Re: getcwd fixes for bugs in glibc, Solaris, OpenBSD, ..., Jim Meyering, 2004/11/26
- [bug-gnulib] Re: getcwd fixes for bugs in glibc, Solaris, OpenBSD, ..., Paul Eggert, 2004/11/26
- [bug-gnulib] Re: getcwd fixes for bugs in glibc, Solaris, OpenBSD, ..., Jim Meyering, 2004/11/28
- [bug-gnulib] Re: getcwd fixes for bugs in glibc, Solaris, OpenBSD, ..., Paul Eggert, 2004/11/28
- Re: [bug-gnulib] Re: getcwd fixes for bugs in glibc, Solaris, OpenBSD, ..., Jim Meyering, 2004/11/29
- [bug-gnulib] Re: getcwd fixes for bugs in glibc, Solaris, OpenBSD, ...,
Jim Meyering <=
- [bug-gnulib] Re: getcwd fixes for bugs in glibc, Solaris, OpenBSD, ..., Jim Meyering, 2004/11/28
- [bug-gnulib] Re: getcwd fixes for bugs in glibc, Solaris, OpenBSD, ..., Paul Eggert, 2004/11/28
- Re: [bug-gnulib] Re: getcwd fixes for bugs in glibc, Solaris, OpenBSD, ..., Jim Meyering, 2004/11/29