Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site rlgvax.UUCP
Path: utzoo!linus!philabs!cmcl2!seismo!rlgvax!guy
From: guy@rlgvax.UUCP (Guy Harris)
Newsgroups: net.unix
Subject: Re: Clunch protection
Message-ID: <201@rlgvax.UUCP>
Date: Tue, 16-Oct-84 18:13:23 EDT
Article-I.D.: rlgvax.201
Posted: Tue Oct 16 18:13:23 1984
Date-Received: Thu, 18-Oct-84 00:44:21 EDT
References: <>, <205@itm.UUCP> <5312@brl-tgr.ARPA> <200@rlgvax.UUCP>
Organization: CCI Office Systems Group, Reston, VA
Lines: 22

> XXX
> > ... will let the kernel exec the script using the correct shell
> 
> On our system, the kernel can't exec scripts: it only execs files 
> with magic numbers.  I thought the choice of what command interpreter
> to exec to read the script was made by the shell, not by the kernel. 

Well, that depends on which of "our" systems you're talking about.  Our
VAXes and Power 6es can exec scripts, because they're running 4.2BSD-based
OSes; the Power 5s are running a V7/S3 based OS and can't.

Dennis Ritchie came up with the notion of permitting executable files to
be executable by an arbitrary interpreter other than the CPU hardware/
microcode; the way it's done is with a magic "number" of "#!".  The
characters following the "#!" are interpreted as the path of the program
to be executed and optional arguments to that program; the path of the
file to be "executed" is given as the last argument.

This has only been implemented on Berkeley systems, to my knowledge.

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy