bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new module 'access'


From: Eli Zaretskii
Subject: Re: new module 'access'
Date: Sat, 28 Sep 2019 15:17:36 +0300

> From: Bruno Haible <address@hidden>
> Cc: address@hidden, address@hidden
> 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 ;-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]