* does zsh ignore the QUIT signal? @ 2006-03-29 9:03 ` Vincent Lefevre 2006-03-29 19:09 ` Peter Stephenson 0 siblings, 1 reply; 2+ messages in thread From: Vincent Lefevre @ 2006-03-29 9:03 UTC (permalink / raw) To: zsh-users 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? Searching for QUIT in the zsh man page, I just get: SIGNALS The INT and QUIT signals for an invoked command are ignored if the com- mand is followed by `&' and the MONITOR option is not active. Other- wise, signals have the values inherited by the shell from its parent (but see the TRAPNAL special functions in the section `Functions'). whereas in the bash man page, this behavior is documented: SIGNALS When bash is interactive, in the absence of any traps, it ignores SIGTERM (so that kill 0 does not kill an interactive shell), and SIGINT is caught and handled (so that the wait builtin is interruptible). In all cases, bash ignores SIGQUIT. If job control is in effect, bash ignores SIGTTIN, SIGTTOU, and SIGTSTP. -- Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / SPACES project at LORIA ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: does zsh ignore the QUIT signal? 2006-03-29 9:03 ` does zsh ignore the QUIT signal? Vincent Lefevre @ 2006-03-29 19:09 ` Peter Stephenson 0 siblings, 0 replies; 2+ messages in thread From: Peter Stephenson @ 2006-03-29 19:09 UTC (permalink / raw) To: zsh-users 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/ ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-03-29 19:10 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <vincent@vinc17.org> 2006-03-29 9:03 ` does zsh ignore the QUIT signal? Vincent Lefevre 2006-03-29 19:09 ` Peter Stephenson
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).