Joseph Kowalski wrote:
> 
> Whoot, Whoot!  Its about time (even if this isn't currently called ksh).
> 
> One minor comment:
> 
>     /sbin/ksh93                         32-bit korn shell (2nd copy)
>     /sbin/pfksh93                       hard link to /sbin/ksh93
>     /sbin/rksh93                        hard link to /sbin/ksh93
> 
> Do we need these any more than /sbin/bash, /sbin/zsh, ... ?
> 
> I'd rather not get into shell wars (my favorite shell is better than your
> favorite shell becasue I'm on root).
> 
> I'd like to see a fairly strong justification for these or have them removed
> from the proposal.

AFAIK there isn't opne strong justification but lots of smaller ones:
- The term "copy" doesn't really apply to "/sbin/ksh93". The "ksh93"
binary is actually only a ~~5k frontend which immediately calls into
libshell (which is ksh93 made available as shared library).
The actual code looks like this (see
http://polaris.blastwave.org/browser/on/branches/ksh93/gisburn/prototype002/m1_ast_ast_imported/usr/src/lib/libshell/common/sh/pmain.c):
-- snip --
22 #include <shell.h>
23      
24 typedef int (*Shnote_f)(int, long, int);
25      
26 int main(int argc, char *argv[])
27 {
28         sh_waitnotify((Shnote_f)0);
29         return(sh_main(argc, argv, 0));
30 }
-- snip --
That's all - and this source didn't change for a couple of years.

- "libshell" and all other required libraries already live in /lib (that
applications like SMF etc. can use them in the future) and IMO it is not
very usefull to obmit the frontend in the root filesystem when the
majority of the code already lives in '/' anyway (as I said: we're
talking about a ~~5k penaltity to make things MUCH easier for script
writers, admins and users (see below)).

- Right now Solaris has no POSIX-conformant shell in the root filesystem
- which means applications who need to be started before /usr gets
mounted are stuck with the /sbin/sh monstrosity which means any scripts
which need POSIX features need to be ported first due lack of a
POSIX-conformant shell.

- /sbin/pfksh93 and /sbin/rksh93 are just hardlinks to /sbin/ksh93 (they
are included for completeness reasons)

- Finally: Imagine the picture: The main server of your department fails
and cannot mount /usr anymore. The phone starts to ring (angry users!),
the door operns and your manager/professor appears in front of your desk
and starts yelling around. In this situation you have to deal with a
shell called "/sbin/sh" which treats things like "working editor mode"
and other things as "optional" features (e.g. each typo forces you to
rewrite the line unless you figure out how the editor mode for /sbin/sh
works - and usually you do not have that much time before the person in
front of your desk gets rabies...).
/sbin/sh has a VERY bad reputation of being the worst imagineable
(s)hell in such a case and there is more than one large thread on
news:comp.unix.solaris whether "... /sbin/sh can be replaced by
something less "horrible" ...". We do not want to replace /sbin/sh right
now but I think the extra 5k (compared to 1200kb needed by bash (and I
won't comment here about "bash"'s non-existant POSIX conformance)) may
please many users in such an emergency because they can quickly type
<k><s><h><9><3> and then get working emacs/gamcs/vi editor modes, a
history and other goodies.

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

Reply via email to