Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.hawaii.edu!ames!news.tulane.edu!darwin.sura.net!ukma!usenet.ins.cwru.edu!odin!chet From: chet@odin.INS.CWRU.Edu (Chet Ramey) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: /bin/sh isn't Bourne shell Date: 5 Feb 1996 21:14:11 GMT Organization: Case Western Reserve University, Cleveland, Ohio, USA Lines: 29 Message-ID: <4f5rv3$5jm@madeline.INS.CWRU.Edu> References: <4ekrik$rlf@eccles.dsbc.icl.co.uk> <4enl74$ifr@eccles.dsbc.icl.co.uk> <3111D553.39F4@pinsight.com> <4ets1o$rvu@nntp5.u.washington.edu> NNTP-Posting-Host: odin.ins.cwru.edu Cc: In article <4ets1o$rvu@nntp5.u.washington.edu>, William R. Somsky <somsky@dirac.phys.washington.edu> wrote: >Various people have been writing on the new, POSIX-ly correct /bin/sh >variances from the traditional sh behavior. Esp. in regards to $ENV and >aliases mangling the behavior of scripts such as MAKEDEV. > >What it sounds like is that with the addition of $ENV, sh needs a >command flag, similar to csh's '-f' flag, which would cause it to >ignore $ENV and _not_ source any special shell-initialization files. Not really. What's needed is to specify that $ENV is expanded and sourced only for interactive shells. (The times when interactive and non-interactive shells are started are fairly well nailed down, though POSIX.2 does not specify them very clearly.) The latest draft of POSIX 1003.2 that I have (1003.2b/D11 of May, 1995) specifes that $ENV is expanded and sourced only for interactive shells. It appears that the POSIX.2 committee has recognized the problem. Of course, the rationale says ``This standard does not define when noninteractive shells are invoked; therefore the behavior of and ENV file processed is unpredictable. The processing of the ENV file could have side effects that can be accounted for by a script writer.'' -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Chet Ramey, Case Western Reserve University Internet: chet@po.CWRU.Edu