Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!ames!lll-tis!ptsfa!ihnp4!cbosgd!mandrill!hal!ncoast!allbery From: allbery@ncoast.UUCP (Brandon Allbery) Newsgroups: comp.unix.wizards Subject: Re: SysV shell questions Message-ID: <4238@ncoast.UUCP> Date: Sat, 22-Aug-87 15:54:15 EDT Article-I.D.: ncoast.4238 Posted: Sat Aug 22 15:54:15 1987 Date-Received: Wed, 26-Aug-87 06:41:08 EDT References: <10279@orchid.waterloo.edu> Reply-To: allbery@ncoast.UUCP (Brandon Allbery) Followup-To: comp.unix.wizards Distribution: comp Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 30 As quoted from <10279@orchid.waterloo.edu> by egisin@orchid.waterloo.edu (Eric Gisin): +--------------- | The author of the PD shell suggested I make functions exportable. | It seems this was a design goal for the SysV shell, but was not implemented | for some reason. It could have been an implementation problem, | or that function definitions in the enviroment break other programs. | Has function exportation been implemented in any Bourne-based shell? +--------------- The problem with exporting functions is that if they are compatible with getenv() then there's no reliable way to identify them as functions; and if they aren't, then any program calling getenv() will break when used under the shell with exported functions. I personally prefer the $ENV solution: if the environment contains "ENV=filename" when the shell starts up, source the file. (This is from ksh.) BTW, if this is the Minix sh, let me know what you are doing. I'm trying to cajole Doug Gwyn to send me diffs to implement Tenex-style line editing in the Bourne shell, with intent to see how hard it would be to retrofit them into the Minix sh -- the source looks something like the same kind of code as in the SVR2 shell. (At least, as I remember it from a few years ago.) [If that fails, I'll try designing one of my own, and would prefer to use a "modernized" shell.] -- Brandon S. Allbery, moderator of comp.sources.misc and comp.binaries.ibm.pc {{harvard,mit-eddie}!necntc,well!hoptoad,sun!mandrill!hal}!ncoast!allbery ARPA: necntc!ncoast!allbery@harvard.harvard.edu Fido: 157/502 MCI: BALLBERY <> ** Site "cwruecmp" is changing its name to "mandrill". Please re-address ** *** all mail to ncoast to pass through "mandrill" instead of "cwruecmp". ***