Re: [PATCH] findprog-in: Set errno to indicate why NULL was returned.

2019-09-28 Thread Bruno Haible
Eli Zaretskii wrote: > The value of EACCES (not EACCESS!) on MS-Windows frequently means the > file cannot be accessed for a reason that has nothing to do with > execute permissions. It could be, for example, that some intermediate > directory in the full file name doesn't exist or is otherwise >

Re: [PATCH] findprog-in: Set errno to indicate why NULL was returned.

2019-09-16 Thread Eli Zaretskii
> From: Bruno Haible > Cc: Paul Smith > Date: Sun, 15 Sep 2019 19:58:56 +0200 > > + - Otherwise, it sets errno and returns NULL. > + Specific errno values include: > + - ENOENT: means that the program's file was not found. > + - EACCESS: means that the program's file was found

Re: [PATCH] findprog-in: Set errno to indicate why NULL was returned.

2019-09-15 Thread Bruno Haible
Hi Paul, > Without this change it's impossible for a program to show the correct > error message when the program is found on the path, but is not > executable. Good point! I've committed a slightly different patch, based on yours. While your patch was fully correct, I have different preferences

Re: [PATCH] findprog-in: Set errno to indicate why NULL was returned.

2019-09-14 Thread Paul Smith
On Sat, 2019-09-14 at 15:35 -0400, Paul Smith wrote: > Set errno to either ENOENT if the program was not found, or another > error if a program was found but was no suitable (i.e., EACCES). Without this change it's impossible for a program to show the correct error message when the program is foun

[PATCH] findprog-in: Set errno to indicate why NULL was returned.

2019-09-14 Thread Paul Smith
Set errno to either ENOENT if the program was not found, or another error if a program was found but was no suitable (i.e., EACCES). * modules/findprog: Depend on errno. * lib/findprog-in.c (find_in_given_path): Save errno if it is not ENOENT and reset errno before returning NULL. * lib/findprog.h