zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-users@sunsite.dk
Subject: Re: does zsh ignore the QUIT signal?
Date: Wed, 29 Mar 2006 20:09:48 +0100	[thread overview]
Message-ID: <200603291909.k2TJ9mj5003516@pwslaptop.csr.com> (raw)
In-Reply-To: Message from Vincent Lefevre <vincent@vinc17.org>  of "Wed, 29 Mar 2006 11:03:39 +0200." <20060329090339.GF22295@prunille.vinc17.org>

Vincent Lefevre wrote:
> When I type "while true; do true; done" from an interactive zsh shell,
> I can't interrupt it with SIGQUIT (either with Ctrl-\ or with the
> "kill -QUIT <pid>" command): sending this signal has no effect. Is
> this normal?

Yes, although I had to search the source code to find this out.  The
shell has ignored it at least as far back as the CVS archive goes (April
1999).

This should let you interrupt the shell with it:
  TRAPQUIT() { return $(( 128 + $1 )); }
It doesn't set the return status, unlike SIGINT, however (and because
it's handled there's no core dump).

This documents it.

Index: Doc/Zsh/jobs.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/jobs.yo,v
retrieving revision 1.4
diff -u -r1.4 jobs.yo
--- Doc/Zsh/jobs.yo	2 Jul 2004 14:59:14 -0000	1.4
+++ Doc/Zsh/jobs.yo	29 Mar 2006 19:04:07 -0000
@@ -95,6 +95,7 @@
 The tt(INT) and tt(QUIT) signals for an invoked
 command are ignored if the command is followed by
 `tt(&)' and the tt(MONITOR) option is not active.
+The shell itself always ignores the tt(QUIT) signal.
 Otherwise, signals have the values
 inherited by the shell from its parent
 (but see the tt(TRAP)var(NAL) special functions in noderef(Functions)).

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page still at http://www.pwstephenson.fsnet.co.uk/


      reply	other threads:[~2006-03-29 19:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <vincent@vinc17.org>
2006-03-29  9:03 ` Vincent Lefevre
2006-03-29 19:09   ` 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=200603291909.k2TJ9mj5003516@pwslaptop.csr.com \
    --to=p.w.stephenson@ntlworld.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).