access
======

POSIX specification:
 https://pubs.opengroup.org/onlinepubs/9699919799/functions/access.html

Gnulib module: access

Portability problems fixed by Gnulib:

  * This function does not support the X_OK mode on some platforms: MSVC 14.

  * This function does not reject trailing slashes on symlinks to non-directories on some platforms: Mac OS X 10.5.

Portability problems not fixed by Gnulib:

  * This function uses the effective id instead of the real id on some platforms: Cygwin 1.5.x.

Other problems of this function:

  * There is an inherent race between calling this function and performing some action based on the results; you should think twice before trusting this function, especially in a set-uid or set-gid program.

  * This function does not have an option for not following symbolic links (like stat versus lstat).  If you need this option, use the Gnulib module faccessat with the AT_EACCESS flag.

  * On native Windows, files whose basename does not contain a . cannot be executed through execlp or execvp.  Nevertheless, this function may return true for such files.

  * On Windows, different facilities for executing a program have different ways of finding an executable file, by trying various suffixes.  For example, execlp and execvp search for files with the suffixes .com, .exe, .bat, .cmd, when the file with the given file name does not exist.  Whereas cmd.exe searches according to the PATHEXT environment variable.  This function does not perform any search; it merely looks at the file with the given file name.