zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-users@sunsite.dk
Subject: Re: localtraps
Date: Tue, 26 Apr 2005 19:34:16 +0100	[thread overview]
Message-ID: <200504261834.j3QIYHSa018951@news01.csr.com> (raw)
In-Reply-To: <20050426030308.GA21501@quark.hightek.org>

Vincent Stemen wrote:
> I had hoped that I could get around the problem for now by explicitly
> resetting the signal trap without using localtraps but, as you
> indicated, it will not let me do anything with the same signal while
> it is in the signal handler function.  This is a real problem that I
> don't know how to get around.

The problem may be related to the fact that the shell executes traps
from within the signal handler.  Other shells presumably wait for the
handler to exit and execute the trap at the next obvious point (e.g. a
command executed).

However, I've tried this in some recent versions of zsh (4.2.0 and
4.3.0-dev-1, which is a moving target) and it seems to do what I think
you want... abort the programme when you hit ^C twice quickly, otherwise
continue.  So I'm not sure what you're doing wrong.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************


  reply	other threads:[~2005-04-26 18:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-25  6:35 localtraps Vincent Stemen
2005-04-25 16:32 ` localtraps Bart Schaefer
2005-04-26  0:50   ` localtraps Vincent Stemen
2005-04-26  3:03   ` localtraps Vincent Stemen
2005-04-26 18:34     ` Peter Stephenson [this message]
2005-04-26 22:12       ` localtraps Vincent Stemen
2005-04-27  5:59         ` localtraps Bart Schaefer
2005-04-28  1:00           ` localtraps Vincent Stemen
2005-04-28  8:20             ` localtraps Bart Schaefer
2005-04-27  5:36       ` localtraps Bart Schaefer

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=200504261834.j3QIYHSa018951@news01.csr.com \
    --to=pws@csr.com \
    --cc=zsh-users@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).