Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!mcsun!hp4nl!utrcu1!mi.eltn.utwente.nl!klamer From: klamer@mi.eltn.utwente.nl (Klamer Schutte) Newsgroups: comp.os.minix Subject: Re: executable scripts? Message-ID: Date: 6 May 91 07:30:54 GMT References: <1991Apr29.110459.25477@doe.utoronto.ca> <10120@plains.NoDak.edu> Sender: news@utrcu1.UUCP Organization: University of Twente, BSC-El Lines: 32 In <10120@plains.NoDak.edu> overby@plains.NoDak.edu (Glen Overby) writes: ->In article klamer@mi.eltn.utwente.nl (Klamer Schutte) writes: ->>BSD unix systems recognise the #! as a magic word and execute it with the ->>proper interpreter. Small unix systems does not. ->>However, a proper shell >>should<< look at the first two characters of a ->>script it gets (when the script is executable). Since minix sh does not, ->I disagree. The shell should not be looking at executables; it should ->merely "exec" them and the kernel should determine what is REALLY done with ->the executable, be it loaded as a binary image or fed through an interpreter. Yes, it can be changed. Just a couple of changes in mm. Hey world (Andy, are you listening), how do you think about this change? ->By requiring the "shell" to check for executable scripts, you complicate any ->program which chooses to use exec(2) since it, too, must open the executable ->and check for an interpreter. Any executable should be "exec"-able. No, from all programs only sh should do this. This because all existing programs (to my knowledge, at least) first try an exec() and if that fails they try to get the program executed by sh(1) (by means of exec'ing /bin/sh). ->I don't have P1003.1 with me, so I can't check if it addresses this issue. Neither can i. Klamer -- Klamer Schutte Faculty of electrical engineering -- University of Twente, The Netherlands klamer@mi.eltn.utwente.nl {backbone}!mcsun!mi.eltn.utwente.nl!klamer