[Top][All Lists]

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

Less detailed error for ENOENT from execve

From: Kirill Elagin
Subject: Less detailed error for ENOENT from execve
Date: Sun, 9 Oct 2022 11:32:47 -0400


I think the execute_cmd.c change here
made things worse, not better. I don’t know what the original report
that prompted this change was though, but my impression is that the
error became much less detailed.

The problem with `ENOENT` error from `execve` is that it is ambiguous:
it will be returned in the case when the executable does not exist
_or_ when the requested interpreter does not exist. So, in the `else`
branch there is this chunk of logic that disambiguates them and
reports either “no such file” or “bad interpreter”. With this change,
`ENOENT` now has its own branch and hence that disambiguation logic is
never reached.

(I might be wrong, I don’t have bash 5.2 available to test, this is
purely based on my reading of the code.)


reply via email to

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