> Date: Tue, 24 Oct 2006 09:55:11 +0200
> From: Roland Mainz <roland.mainz at nrubsig.org>
> X-Accept-Language: en
> MIME-Version: 1.0
> To: Korn Shell 93 integration/migration project discussion 
<ksh93-integration-discuss at opensolaris.org>
> CC: "Casper H.S. Dik - Network Security Engineer" 
<Casper.Dik at Holland.Sun.Com>, April Chin <April.Chin at eng.sun.com>, Mike 
Kupfer 
<mike.kupfer at sun.com>
> Subject: Re: [ksh93-integration-discuss] Proposal: Migrating /bin/sh to  
ksh93before /bin/ksh
> Content-Transfer-Encoding: 7bit
> 
> Knut Reinert wrote:
> > 
> > Based on the earlier discussion about the migration of /bin/ksh I'm 
proposing to migrate /bin/sh to ksh93 before /bin/ksh. It may prove to be a 
simpler work with fewer political obstacles because the feature set of the 
Bourne shell is smaller than the set of features found in ksh88.
> 
> In theory it may be nice - but I would expect that this is much more
> difficult than migrating /usr/bin/ksh to ksh93. /usr/bin/sh is used
> almost everywhere, ranging from system calls to makefiles and we would
> require an even larger amount of testing to get this working (another
> problem is that the Bourne shell lives physically in /sbin/sh - which
> means any replacement must live in the root filesystem. The original
> ksh93-integration prototypes placed ksh93 and it's libraries in "/" but
> it was moved to "/usr" as result of the initial ARC case due lack of a
> compelling reason ("no buisiness case") and the matching OS/Net Makefile
> switch to install ksh93 as /sbin/sh was removed, too (there was no easy
> way to conditionally move the libraries around and therefore I removed
> the switch)).
> 
> I and April selected the path to migrate /usr/bin/ksh (and then
> /usr/xpg4/bin/sh (which is based on the same code as the current Solaris
> /usr/bin/ksh)) first and then we _may_ look at /usr/bin/sh again.
> 
> > Benefits:
> > * ksh93 as /bin/sh would provide a POSIX compatible shell
> 
> Did you see
> http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4088172
> ("*sh* request to have /usr/bin/sh be a POSIX shell") yet ? It's marked
> as "Closed, will not be fixed" (I don't know the reason for that, maybe
> April, Mike or Casper know the reason) ... ;-/

This bug was originally closed back in 1997 as "will not fix" because the
POSIX version of sh is already implemented in /usr/xpg4/bin/sh, which is
based on ksh88.  The Solaris OS has /usr/xpg4/bin and /usr/xpg6/bin
versions of utilities to deal with incompatible standards-enforced
behavior with the /usr/bin versions of the utilities.

The compatibility problems with existing customer sh scripts
and sh scripts in the system were considered too risky.

At this point, we are again considering /bin/sh replacement with ksh93, 
but as Roland says, we are taking it a step at a time, starting with 
replacing /bin/ksh first.  I believe the incompatibilities between Bourne
shell and ksh93 may be greater than those between ksh88 (or rather,
Solaris's version of ksh88, /bin/ksh) and ksh93, which could make
the /bin/sh migration more difficult.

> > This is multiplied by the problem that /bin/sh is the default shell for 
system calls such as popen(3c) and system(3c) or utilities like make(1) which 
cannot be changed to another shell based on a system wide tunable or other 
"easy" solutions to work around the limitations of the Bourne shell.

With the use of /bin/sh by popen(), system(), and
make, we will have to be extra careful with the /bin/sh migration...
any usage of popen(), system(), execvp(), etc. will also need to
consider any incompatibilities.

        April


Reply via email to