Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh 4.3.10 terminates with SIGINT when one types Ctrl-G in emacs under Mac OS X
- X-seq: zsh-workers 27183
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: zsh 4.3.10 terminates with SIGINT when one types Ctrl-G in emacs under Mac OS X
- Date: Wed, 22 Jul 2009 10:16:18 +0200
- In-reply-to: <loom.20090722T025614-158@xxxxxxxxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <090712193623.ZM14823@xxxxxxxxxxxxxxxxxxxxxx> <200907131839.n6DIdO6Z003291@xxxxxxxxxxxxxxxxxxx> <20090716162419.GA26179@xxxxxxxxxxxxxxxxxxx> <090717222936.ZM8648@xxxxxxxxxxxxxxxxxxxxxx> <20090718101602.GA5392@xvii> <090718113509.ZM10405@xxxxxxxxxxxxxxxxxxxxxx> <20090718230930.GB5412@xvii> <090719113147.ZM3140@xxxxxxxxxxxxxxxxxxxxxx> <20090720083128.GA6861@xvii> <loom.20090722T025614-158@xxxxxxxxxxxxxx>
On 2009-07-22 02:58:37 +0000, Eric Blake wrote:
> POSIX requires that if a shell starts life with a signal ignored,
> that the shell should silently reject attempts to alter the fact
> that the signal is ignored (either back to a default, or to a
> user-specified handler). Which is very annoying if your shell ever
> gets started with SIGPIPE ignored, but that's life. In other words,
> if you start bash with SIGINT ignored, you can't undo that from
> within the bash shell.
OK, thanks for the explanations. So, the following script shows a bug
in zsh (typing Ctrl-C immediately interrupts the sleep and the script
and SIGINT is output):
#!/bin/sh
trap '' INT
zsh -fc "emulate sh; trap 'echo SIGINT; exit' INT; sleep 6"
I wonder whether zsh should behave in the same way without
"emulate sh".
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author