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



I've missed the beginning of the discussion, so excuse me if I restate
some points...

Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:

> Did you also see Eric Blake's assertion that the shell must not un-ignore
> a signal if it "starts life" with the signal ignored?  That's a "trap"
> command restriction I'd never discovered before (and one I'm not very
> happy about).

I would agree with that for non-interactive shells (that is zsh
interpreting a script).  However not resetting at least the terminal
signals (INT, QUIT, TTIN, TTOU, TSTP, CONT, HUP) to their default
settings (SIG_IGN) for interactive sessions could expose you to a lot
of trouble.  

> } On first sight it looks like the Linux kernel changes semantics based
> } on whether the terminal is in cooked mode or not.  Possibly in an
> } attempt to help a bit with the "what to do on SIGINT in interactive
> } programs" mess we are dealing with here.
> 
> I suspect it's more subtle than that ... e.g., it may be that on linux,
> the SIGINT isn't coming from the terminal driver at all.

Please enligthen me on this one...

Phil.



Messages sorted by: Reverse Date, Date, Thread, Author