Should the login shell be run in its own process group?
I use a rather unusual login shell with no job control (es). It does not claim its own process group. When I hit Ctrl-C, the shell exits. From a bit of tracing, I gather that it catches the SIGINT just fine, then gets another which kills it. Possibly, there is a bug in the shell's signal handling code, but this does not happen in the release iTerm2, nor does it happen in Terminal.
I wrote a small wrapper program that creates its own process group and grabs the terminal with tcsetpgrp() before it execs the shell. When I use this instead of the login shell, the problem goes away.
Hence my suggestion: Perhaps iTerm2 ought to create a new process group for the login shell? I notice that Terminal does so:
-+= 00001 root /sbin/launchd
\-+= 13144 hanche /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal
\-+= 13145 root login -pf hanche
\-+- 13146 hanche -es
(In this pstree output, process group leaders are marked with an = sign.)
As I have a workaround (and probably ought to incorporate it into es itself), I can live with this not receiving a high priority. (Thanks for giving us iTerm!)
Oh, the details: iTerm2 Build 2.9.20160206 (the beta), OS X 10.11.3.