On Mon, Oct 4, 2021 at 4:46 PM Chet Ramey <chet.ra...@case.edu> wrote:

> Bash reports the error it gets back from execve. In this case, it's
> probably that the loader specified for the executable isn't present on your
> system.
>

OTOH, for a script, Bash checks to see if the problem is with the
interpreter and reports accordingly:

 $ ./foo.sh
bash: ./foo.sh: /bin/noexist: bad interpreter: No such file or directory

The shell does go on to stat() the file after getting ENOENT from execve(),
so I suppose it could
add some clarifying note to the error message for the case of a binary file
too.
  • Misleading... Andrea Monaco
    • Re: M... Alex fxmbsw7 Ratchev
    • Re: M... Chet Ramey
      • R... Ilkka Virta
        • ... Dennis Williamson
        • ... Chet Ramey
          • ... Alex fxmbsw7 Ratchev
            • ... Ángel
              • ... Dmitry Goncharov via Bug reports for the GNU Bourne Again SHell
                • ... Eli Schwartz
                • ... Dmitry Goncharov via Bug reports for the GNU Bourne Again SHell
                • ... Robert Elz
                • ... Chet Ramey
                • ... Robert Elz

Reply via email to