tags 705293 fixed-upstream
thanks

On Fri, Apr 12, 2013 at 5:26 PM, The Wanderer <[email protected]> wrote:
> Package: manpages-dev
> Version: 3.44-1
> Severity: normal
>
> Dear Maintainer,
>
> The man page for the 'access' function describes two ways to use the
> function: to check whether the current real user ID has specific
> permissions for a file (R_OK, W_OK, X_OK), or to check whether that file
> simply
> exists (F_OK).
>
> The "Return Value" section of the man page, however, appears to be
> written exclusively in the context of the "check permissions" modes. It
> documents a value of zero as meaning "success (all requested permissions
> granted)", but does not describe the meanings of return values when checking
> only for existence rather than attempting to check any permissions.
>
> A usage example near the bottom of what appears to be the z/OS man page for
> the
> same function
>
> http://publib.boulder.ibm.com/infocenter/zos/v1r11/topic/com.ibm.zos.r11.bpxbd00/rtacc.htm
> seems to indicate that in the "check existence" mode, a return value of
> zero indicates that the file exists, and nonzero indicates that the
> file does not exist; however, even in that version of the man page, the
> "Returned Value" section appears to be written exclusively in the
> context of the "check permissions" modes.

Thanks for the report. I agree that the page should be clearer on this
point. I've amended the REURN VALUE section to read:

       On success (all requested permissions granted, or mode is  F_OK
       and the file exists), zero is returned.  On error (at least one
       bit in mode asked for a permission that is denied, or  mode  is
       F_OK  and  the  file  does  not  exist,  or  some  other  error
       occurred), -1 is returned, and errno is set appropriately.

Cheers,

Michael

--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to