arnold@mathcs.emory.edu (Arnold D. Robbins {EUCC}) (03/03/89)
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. 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.) 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. For example, I had a `` trap 'times' 0 '' in /etc/profile, so that when users logged out they would see how much cpu they used. If ksh88 is your login shell, it logs out as soon as it has finished processing the file. (Makes it hard to get any work done...) If the trap is removed from /etc/profile and put in $HOME/.profile, the same thing happens. 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? I used 'makeshell' to build ksh. Has anyone else seen any of these? Am I missing something fundamental? Followups to the net would probably be useful, as I susspect we're one of the first ksh88 customers... Thanks, -- "Unix is a Registered | Arnold Robbins -- Emory University Computing Center Bell of AT&T Trademark | DOMAIN: arnold@unix.cc.emory.edu Laboratories." | UUCP: gatech!emory!arnold PHONE: +1 404 727-7636 -- Donn Seeley | BITNET: arnold@emoryu1 FAX: +1 404 727-2599
ekrell@hector.UUCP (Eduardo Krell) (03/03/89)
In article <3767@emory.mathcs.emory.edu> arnold@mathcs.emory.edu (Arnold D. Robbins {EUCC}) writes: >Followups to the net would probably be useful, as I susspect we're one >of the first ksh88 customers... Outside AT&T, you mean. ksh88 was beta tested at hundreds of AT&T sites for a long time before it was released to the Toolchest. It was tested on everything from PCs to mainframes, running BSD, System V and dozens of other Unix systems. Eduardo Krell AT&T Bell Laboratories, Murray Hill, NJ UUCP: {att,decvax,ucbvax}!ulysses!ekrell Internet: ekrell@ulysses.att.com
arnold@mathcs.emory.edu (Arnold D. Robbins {EUCC}) (03/05/89)
In article <3767@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@unix.cc.emory.edu Laboratories. | UUCP: gatech!emory!arnold PHONE: +1 404 727-7636 -- Donn Seeley | BITNET: arnold@emoryu1 FAX: +1 404 727-2599
arnold@mathcs.emory.edu (Arnold D. Robbins {EUCC}) (03/07/89)
In article <3777@emory.mathcs.emory.edu> I wrote: >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.) Here is Dave Korn's bug fix: | From: research!ulysses!dgk@research.att.com | Subject: Re: ksh problems | | I thought that I had fixed this. The fix is to change line 768 of | sh/builtin.c from | if((a1=strchr(a1,'?')) && tty_check(fd)) | to | if(a1 && (a1=strchr(a1,'?')) && tty_check(fd)) I also found the problem in the man page. There is a spot where it says .if \X=0 .IR rsh . .if \X=1 .IR rksh . Both of these should be \nX. I have found a few typos in the man page and may post full diffs later, that is not as critical though. Again, my hat's off (figuratively) to Dave Korn for his work and his help. -- Unix is a Registered | Arnold Robbins -- Emory University Computing Center Bell of AT&T Trademark | DOMAIN: arnold@unix.cc.emory.edu Laboratories. | UUCP: gatech!emory!arnold PHONE: +1 404 727-7636 -- Donn Seeley | BITNET: arnold@emoryu1 FAX: +1 404 727-2599