Source-Changes archive

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

Re: CVS commit: src/sys/kern



On Thu, Nov 04, 2004 at 11:55:28PM +0000, Matt Thomas wrote:
> 
> Module Name:  src
> Committed By: matt
> Date:         Thu Nov  4 23:55:28 UTC 2004
> 
> Modified Files:
>       src/sys/kern: exec_script.c
> 
> 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:  
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 
file is for a different architecture, it can return the "forget it" error. 
Thus exec_script would never get called.

Take care,

Bill

Attachment: pgproeem5lRes.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index