zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: PATCH: (2) test for trap EXIT fix.
Date: Mon, 08 Oct 2001 11:32:29 +0100	[thread overview]
Message-ID: <485.1002537149@csr.com> (raw)
In-Reply-To: "Bart Schaefer"'s message of "Mon, 08 Oct 2001 09:56:31 -0000." <1011008095631.ZM3834@candle.brasslantern.com>

Bart Schaefer wrote:
> On Oct 8,  9:10am, Peter Stephenson wrote:
> }
> } I'm committing this, partly because it seems to make the shell reasonably
> } compatible with older versions
> 
> Did you also see my message about how this still doesn't quite act like
> bash (and presumably therefore not quite like the standard shell)?

Yes, but that's the same issue as whether falling off the end of the list
should trigger the trap.  The position of the `trap' command matters
because of the stuff in entersubsh() we discussed earlier.  I have a
trivial patch to fix this by calling the trap at the end of execcmd() if
the shell is forked and we are exiting (which is implied at that point if
the shell is forked).  This changes the behaviour, however, so I'm not sure
what to do.

> } but mainly because it saves me having to
> } edit it out when committing the zglob patch.
> 
> Does that mean you're putting the exit-trap patch onto the stable branch?

No, I meant to say that.  It's not yet stable enough.  But we should
document the bug in the 4.0 BUGS list.

I've committed the ChangeLog for the previous patches.

Index: Etc/BUGS
===================================================================
RCS file: /cvsroot/zsh/zsh/Etc/BUGS,v
retrieving revision 1.2
diff -u -r1.2 BUGS
--- Etc/BUGS	2000/04/07 15:01:03	1.2
+++ Etc/BUGS	2001/10/08 10:31:42
@@ -2,6 +2,10 @@
 KNOWN BUGS IN ZSH
 -----------------
 
+When a shell is exited from within a function, the only EXIT trap which is
+run is the one for the function itself, if any.  In particular, an EXIT
+trap set for the shell itself will not be executed in this case.
+------------------------------------------------------------------------
 On some terminals, display of lines with exactly 80 characters is
 problematic.  zsh assumes that the terminal does not print an extra
 newline in this case, but some terminals (e.g. aixterm) do.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


      reply	other threads:[~2001-10-08 10:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-01 12:01 PATCH: " Peter Stephenson
2001-10-01 16:01 ` Bart Schaefer
2001-10-02 10:23   ` Peter Stephenson
2001-10-02 14:19     ` Bart Schaefer
2001-10-02 14:39       ` Peter Stephenson
2001-10-02 15:19         ` Bart Schaefer
2001-10-02 15:32           ` Peter Stephenson
2001-10-02 16:03             ` Bart Schaefer
2001-10-03 15:18               ` PATCH: (2) " Peter Stephenson
2001-10-03 16:16                 ` Bart Schaefer
2001-10-08  8:10                 ` Peter Stephenson
2001-10-08  9:56                   ` Bart Schaefer
2001-10-08 10:32                     ` Peter Stephenson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=485.1002537149@csr.com \
    --to=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).