Re: clone fails: Could not get the current working directory
- From
- John Freeman <jfreeman@cs.tamu.edu>
- Date
- Sep 22, 2008, 18:32 UTC
- Message-ID
- <48D7E4B7.3010109@cs.tamu.edu>
- In-Reply-To
- <48D6C822.7050602@cs.tamu.edu>
I have also tried copying the repo to my home directory on the remote Sun machine, and then cloning to my local machine. This works as expected.
Does anyone know why a call to getcwd() would fail?
I found this in some documentation on getcwd: http://www.opengroup.org/onlinepubs/009695399/functions/getcwd.html "If a program is operating in a directory where some (grand)parent directory does not permit reading, getcwd() may fail, as in most implementations it must read the directory to determine the name of the file. This can occur if search, but not read, permission is granted in an intermediate directory, or if the program is placed in that directory by some more privileged process (for example, login). Including the [EACCES] error condition makes the reporting of the error consistent and warns the application writer that getcwd() can fail for reasons beyond the control of the application writer or user. Some implementations can avoid this occurrence (for example, by implementing getcwd() using pwd, where pwd is a set-user-root process), thus the error was made optional."
Does anyone know for certain if this is true for Sun machines? Would it be possible to patch / introduce a macro that changes the use of getcwd() to a use of pwd, like the above documentation suggests?
- John