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



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).
 
} 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.



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