[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: pwd improvement: removing the PATH_MAX limit

From: Jim Meyering
Subject: FYI: pwd improvement: removing the PATH_MAX limit
Date: Mon, 19 Apr 2004 23:05:59 +0200

I doubt many have noticed, but GNU pwd would fail when run from
a working directory whose absolute name is longer than PATH_MAX.
This came down to a limitation in most (all?) implementations of
the getcwd function.  That includes Linux-2.6.x w/glibc-2.3.2,
Solaris 5.9, FreeBSD 5.0, NetBSD 1.6.  Maybe the Hurd lacks this limit?

I've just checked in changes that make GNU pwd work in spite of this
limitation.  Until the next release, you can find it in the coreutils CVS
repository.  Note that bash's built-in pwd function has the limitation,
but that zsh's works just fine.

I have doubts about the utility of this change, so would be
particularly happy to hear that someone has found a real use
for this unencumbered version of pwd.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]