Re: Handle ENOTDIR in pathexec_run

From: Laurent Bercot <ska-supervision_at_skarnet.org>
Date: Wed, 19 Feb 2020 10:14:02 +0000

>Simply put: One wants to (largely) ignore the error if there's a problem with the directory prefix from the search path; and one wants to retain the error if there's a problem with the final pathname component, the name that is being searched for or the actual node that it names. Unfortunately, execve() can return EACCESS in both cases, and simply deciding to exit the loop based upon nothing but the errno value is therefore an unworkable strategy.

Can you elaborate why you need to differentiate between error in the
directory prefix and error in the final pathname component? Why do you
think that retaining the error (and failing the pathexec) is better if
there is a problem with the final pathname component? IMO, if the
binary there is unsuitable for executing, it makes sense to move on
to the next path.

I'm going to add ENOTDIR support to the skalibs' pathexec_run; I'm
interested in knowing why you think it's not good enough.

--
Laurent
Received on Wed Feb 19 2020 - 10:14:02 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC