[Top][All Lists]

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

Re: a suggestion: an error message could be more helpful

From: Chet Ramey
Subject: Re: a suggestion: an error message could be more helpful
Date: Thu, 29 Sep 2011 19:01:03 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2

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

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

reply via email to

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