bug-bash
[Top][All Lists]
Advanced

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

Re: Misleading error when attempting to run foreign executable


From: Dennis Williamson
Subject: Re: Misleading error when attempting to run foreign executable
Date: Mon, 4 Oct 2021 09:25:23 -0500

On Mon, Oct 4, 2021, 9:09 AM Ilkka Virta <itvirta@gmail.com> wrote:

> On Mon, Oct 4, 2021 at 4:46 PM Chet Ramey <chet.ramey@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.
>

The error is produced by the kernel. Bash merely passes it along.

>


reply via email to

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