Chuck Swiger <cswi...@mac.com> wrote: > On Nov 11, 2011, at 11:56 AM, Paul Eggert wrote: > > I wouldn't worry about that test failure. > > It's a known problem with getcwd on traditional > > Unix and BSD. > > Can you be more verbose about this problem with getcwd()? > > The only major differences I see between the BSD version and a glibc version > is that BSD will allocate a buffer for you if you pass NULL pointer as the > first arg, and that glibc/Linux will try to look at /proc/self/cwd to try and > avoid returning EACCES....
getcwd() has been turned into a syscall on Solaris 5 years ago for Linux compatibility. I would guess that Linux also implements a related syscall. This allows to get the working directory in cases where all other methods must fail. Jörg -- EMail:jo...@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin j...@cs.tu-berlin.de (uni) joerg.schill...@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily