On 9/28/11 5:39 PM, daysleeper wrote:

> Bash Version: 4.2
> Patch Level: 0
> Release Status: release
> 
> Description:
>     If you run a 64-bit executable on a 32-bit system via bash (which can
> happen by accident), it gives an "bash: ./fwupd: cannot execute binary
> file" error message. What seems to happen is that the execve() function in
> execute_cmd.c returns 8, and in this case bash only tests if the file is a
> script or binary. An ENOEXEC-like message of "An executable is not in a
> recognized format, or is for the wrong architecture" or at least the
> ENOEXEC string would be more helpful in determining the cause of the problem.

Posix (and history) require that bash attempt to run a command equivalent
to "bash foo" if executing "foo" returns -1/ENOEXEC.  It's allowed to
bypass that exec if it can determine the file isn't a text file.  That's
where the error message comes from.  Maybe the text can be improved, but
there's also the danger of being too specific about a more general
condition.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to