> 
> On Fri, 11 Aug 2000, Paul Eggert wrote:
> 
> >    Date: Fri, 11 Aug 2000 12:30:27 -0400 (EDT)
> >    From: "John David Anglin" <[EMAIL PROTECTED]>
> > 
> >    Possibly `(exit $?); exit' could be simplified to just `exit'.
> > 
> > Yes, that's correct.  Sorry, I missed that in my earlier scan.
> 
> I seem to recall (don't remember which system, that is) running into
> problems with a shell that would re-enter the trap command if the exit was
> not given a specific code other than those the ones listed.

I wrote a little shell script to test the behaviour of the two forms
with various shells under hpux 10.20.  With bash, `(exit $?); exit'
is better.  With just `exit', the EXIT trap command is not run.  Thus,
the clean up wouldn't be done under bash.  The HP posix shell works
with either form.  Thus, I recommend leaving things as they are currently.

Dave
-- 
J. David Anglin                                  [EMAIL PROTECTED]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

Reply via email to