Re: [PATCH] Return ENOEXEC, not ENOENT, if a binary's or script'sinterpreter doesn't exist.

From: Pavel Machek
Date: Sat Jul 11 2009 - 16:50:02 EST


On Thu 2009-07-09 03:48:20, Geoffrey Thomas wrote:
> If you try to execute a binary compiled for ld-linux.so.1 (libc5) on a machine
> with only ld-linux.so.2 (libc6), your shell will claim "mybinary: No such file
> or directory", even though the binary exists. The ENOENT actually applies to
> the ELF intepreter, not to the file itself. The same happens if you have a
> nonexistent interpreter in a shell script's shebang line.
>
> Give a more helpful and more expected error, "cannot execute binary file", in
> these cases.

NAK. Current behaviour is useful -- and it is really file thats
missing.

Please improve manpage instead.

(chmod 000 /lib also produces 'interesting' error messages. Better
document those, too). Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/