ksh88 problems

Arnold D. Robbins {EUCC} arnold at mathcs.emory.edu
Mon Mar 6 01:38:31 AEST 1989


In article <3767 at emory.mathcs.emory.edu> I wrote:
>We just ordered and received ksh88 from the toolchest.  I am trying to
>put it up on a Sun 4 running SunOS 4.0. So far I've encountered
>three problems.

At the time I posted this, I was having trouble getting email to David
Korn.  I probably should have said something to that effect, or waited
to post until we had been in touch.  We have subsequently been in contact
about this.

>1) With BRACEPAT=1 in the OPTIONS file,
>
>	echo a{b,c,d}
>
>   core dumps.  I guess this is not such a big deal, but BRACEPAT
>   would be a nice thing to have. (It does what the csh does, for
>   those who are wondering.)

Here is David's bug fix:

| Date: Fri, 3 Mar 89 13:49:12 EST
| From: David Korn <gatech!hector!dgk>
| Subject: Re: ksh 88
| 
| The BRACEPAT problem is a bug.  As said in the README file, only the
| default options have been well tested.  The fix is to change line 442
| of sh/expand.c (the line in front of again: from
| 	ap->argchn = 0;
| to
| 	todo->argchn = 0;

This indeed fixed the problem just fine.  This supplies csh style brace
handling, which experienced ksh users recognize as the one thing the csh
did that ksh didn't. (Don't bother starting csh vs. ksh history debates;
one just got finished in another newsgroup.)

>2) This is the biggy. It appears that a trap on 0 inside either
>   /etc/profile or $HOME/.profile is executed upon exit from the
>   profile file (!), and not when the shell exits.

David was not able to reproduce this.  We tracked it down to a difference
in the configuration of our systems.  It boils down to my having told the
ksh configuration mechanism that we had implemented a feature when in
fact we hadn't (/dev/fd) since I was planning on putting it into my kernel
and wanted ksh88 to supply process substitution once I had it working
(the old ksh did not break this way, though).

So, this was my fault and I hereby publicly apologize to David
for pointing fingers at him for something that wasn't his fault.

>3) Using psroff on the sh.1 man page, my apple laser writer seems to go
>   into an infinite loop around the "Invocation" section.  Has anyone
>   been able to troff the man page ok?

David had no problems troffing on his vax.  I am going to try it on my vax
and if works we can then point at Sun troff or man macros or something.
Certainly this isn't as major a problem.

Ksh can still be made to core dump on a sun by typing a 'read' command with
no options or variable names.  This is supposed to set the REPLY variable.
I have told David about this though. (I just hope the email gets to him
before this article propogates.)

Let me state also that none of this should be taken as directed personally
at David Korn or anyone else.  I think ksh is one of THE neatest pieces of
Unix software to come along in a long time, and it has made my life as
a heavy duty shell script writer infinitely easier over the past five
years.  He has done a very impressive job in extending and enhancing
the shell, and I have nothing but respect and liking for him. (I was
one of the reviewers of his book, and have met him several times as well
as corresponded with him about the shell -- two or three of the new features
in ksh88 were at my suggestion.)

Anyway, having gotten through the initial problems in getting ksh88 going,
I am looking forward to lots of productive use from it.
-- 
Unix is a Registered   | Arnold Robbins -- Emory University Computing Center
Bell of AT&T Trademark | DOMAIN: arnold at unix.cc.emory.edu		
Laboratories.          | UUCP: gatech!emory!arnold	PHONE:	+1 404 727-7636
        -- Donn Seeley | BITNET: arnold at emoryu1		FAX:	+1 404 727-2599



More information about the Comp.unix.questions mailing list