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



Bart Schaefer wrote on Sat, Jul 25, 2009 at 11:58:11AM -0700: 
> On Jul 22,  2:18pm, Martin Cracauer wrote:
> } 
> } Hi, a friend pointed me to this discussion and I took it as an
> } opportunity to fix some minor issues with my SIGINT page.
> } 
> } There would be two ways of dealing with this:
> } 
> } 1) when a child got killed with SIGINT, always abort the script
> } 2) do that only when the shell itself also had received a SIGINT while
> }    that child was executing in the foreground
> } 
> } I have actually implemented 2) in FreeBSD's shell and bash also does
> } 2).  However, I had skipped over that detail when writing the webpage.
> } The have has been corrected.
> } 
> } (let me know if you want credit on the page)
> 
> Credit me if you like, but it's not necessary.
> 
> 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 think that goes without saying but I can as well include it.

In fact this would be useful if somebody want to change a
shellscript's behavior to not abort more than the current program on
SIGINT and go forward with the next statement in the script.

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <cracauer@xxxxxxxx>   http://www.cons.org/cracauer/
FreeBSD - where you want to go, today.      http://www.freebsd.org/



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