> From: Bruno Haible <br...@clisp.org> > Cc: bug-gnulib@gnu.org, psm...@gnu.org > Date: Sat, 28 Sep 2019 14:06:00 +0200 > > There are different ways to test for "executable" on Windows: > - execlp/execvp, > - CreateProcess, > - system / popen, like you say, > - cmd.exe, > - surely more (PowerShell...) > > Let's assume that they work differently (cmd.exe definitely works differently > than execlp/execvp; I tested that). > > The module does not attempt to handle all of these, just the first one, > because > - the function access() is located at the C library level, > - it is compatible with what the old MSVCRT (without the argument check > for the mode in _access()) does.
Well, at the very least how about documenting this subtlety? > If you consider the gnulib access() function unfit for some purpose, you must > also consider the old MSVCRT _acccess() function unfit for the same purpose. Of course I do. I hope Gnulib doesn't use MSVCRT as an example of a good implementation in this case ;-)