Subject: Re: COMPAT_LINUX?
To: None <port-macppc@netbsd.org, p99dreyf@criens.u-psud.fr>
From: Wolfgang Solfrank <ws@tools.de>
List: port-macppc
Date: 04/25/2001 15:15:59
Hi,

> Well, there is a bogus behavior in the kernel: when running any dynamic 
> executable (NetBSD natives executables have the same problem too), if the
> dynamic linker is not found, the kernel tries to execute the binary as a
> bourne shell script, instead of reporting an error. 

Sorry, that's not what's really happening.

While the kernel will try other modes to execute the binary, and in
this process will also try to execute it as a script, it will fail
to do so, since the binary doesn't start with #! as its first two bytes.

Only after return from the execve system call to userland, the shell
which tried to execute the binary will then try to interpret the
executable as a shell script.  The exact behaviour here depends on the
particular shell you are using.

Ciao,
Wolfgang
-- 
ws@TooLs.DE     Wolfgang Solfrank, TooLs GmbH 	+49-228-985800