*BSD News Article 60567


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!lll-winken.llnl.gov!news.larc.nasa.gov!lerc.nasa.gov!purdue!not-for-mail
From: dpm@cs.purdue.edu (David Moffett)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: /bin/sh isn't Bourne shell
Date: 2 Feb 1996 17:28:03 -0500
Organization: Department of Computer Science, Purdue University
Lines: 50
Message-ID: <4eu35j$aqn@ector.cs.purdue.edu>
References: <4enl74$ifr@eccles.dsbc.icl.co.uk> <3111D553.39F4@pinsight.com> <4ets1o$rvu@nntp5.u.washington.edu>
NNTP-Posting-Host: ector.cs.purdue.edu
Summary: POSIX's ENV breaks stuff

While always careful to not wander into a religous war...

In article <4ets1o$rvu@nntp5.u.washington.edu> somsky@dirac.phys.washington.edu (William R. Somsky) writes:
>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.

	This is a good, abet broken idea.  I believe the problem
	here is that POSIX doesn't understand how many thousands 
	of /bin/sh scripts are running moment to moment.  Introducing
	ENV is a well meaning feature creep, but it should have been
	done with a load card option that ENABLED the feature.  Breaking
	things that work in such a subtile manner is way wrong.

>It seems like a $ENV-defeat flag is a necessary counterpart to
>having $ENV in the first place.  Anybody know how this idea can
>be passed on to the POSIX folks?

	If someone can produce a URL, we all should write about this.
	/bin/sh is /bin/sh, not some feature creeped mess.  The 
	previously mentioned configure scripts even break if you
	break what is one of the few invarients in post Version 6.0
	Unix.

	Finally, to say that "thou shalt not mess with root's environment"
	is all very well and good, just grossly unrealistic.  One look,
	for example, at SCO's root environment (where ksh can't even
	be used in some versions of Open Server as root's shell) and
	one knows that scripts that must be portable must withstand 
	tremendous punishment from ideas that are outside Unix norms.

>________________________________________________________________________
>William R. Somsky			      somsky@phys.washington.edu
>Department of Physics, Box 351560		 B432 Physics-Astro Bldg
>Univ. of Washington, Seattle WA 98195-1560		    206/616-2954


/bin/sh is an invarient and if the underpaid, overworked [somewhat like
our favorite FreeBSD core team!]  POSIX.{1|2} committee thinks it needs
to be improved then they need to build a shell called something else or
at least let the scripts turn ON features.

Anyone know what else POSIX.2 broke in /bin/sh?

David Moffett
dpm@cs.purdue.edu