Subject: Re: CVS commit: src/sys/kern
To: Matt Thomas <matt@netbsd.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: source-changes
Date: 11/04/2004 16:16:42
--bajzpZikUji1w+G9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Nov 04, 2004 at 11:55:28PM +0000, Matt Thomas wrote:
>=20
> Module Name:	src
> Committed By:	matt
> Date:		Thu Nov  4 23:55:28 UTC 2004
>=20
> Modified Files:
> 	src/sys/kern: exec_script.c
>=20
> Log Message:
> Check to see if the script has an ELF header, and if so, return ENOEXEC.

What ever happened to the idea of making exec's have three error codes: =20
success, failed, and (the new one) forget it?

"Failed" means that a given exec didn't match the program, and something
else might; the exec code doesn't know that something else won't match.
"Forget it" means the exec code was able to recognize the file and knows
that we can not execute it.

Thus the ELF code could recognize an ELF header, then when it sees the=20
file is for a different architecture, it can return the "forget it" error.=
=20
Thus exec_script would never get called.

Take care,

Bill

--bajzpZikUji1w+G9
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFBisZqWz+3JHUci9cRAlwCAJ9F7fQWwZ9AFHoAD6DinORNW3ZtagCfSO/T
XGJ6IPca4LOBaAPCf9zFW4s=
=MxmA
-----END PGP SIGNATURE-----

--bajzpZikUji1w+G9--