On 10/11/17 03:56 AM, Joerg Schilling wrote:
Brian De Wolf <[email protected]> wrote:

Is it crazy to ask for getcwd's behavior to be changed?  It's
technically allowed by POSIX to fail like this (which I suspect is to
allow for naive implementations that have to walk the filesystem), but
there doesn't seem to be an alternative for a process that wants to
validate its cwd.

POSIX does not allow to do this:

The getcwd() function shall fail if:
...
[EACCES]
     Search permission was denied for the current directory, or read or search
permission was denied for a directory above the current directory in the file
hierarchy.

You may like to send a bug report against that on "austingroupbugs".

Your wish would require that "shall" is replaced by "may".

Perhaps you're looking at an old version?   It says "may" here:

http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html

--
       -Alan Coopersmith-               [email protected]
        Oracle Solaris Engineering - https://blogs.oracle.com/alanc

------------------------------------------
illumos-discuss
Archives: 
https://illumos.topicbox.com/groups/discuss/discussions/T1bf578bf66b8b8b0-M56ae13c39b0bfd81d343d5a6
Powered by Topicbox: https://topicbox.com

Reply via email to