From: mjg AT tusc DOT com DOT au (Mike Grasso) Subject: RE: Control-C, Bash, Command Kill, Bug, Ctrl-C 5 Jun 1998 11:34:15 -0700 Message-ID: <001501bd900e$422eb0e0$7fb002cb.cygnus.gnu-win32@mjg.tusc.com.au> References: <357596D4 DOT AB45BDA1 AT agames DOT com> Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit To: "Frank Kuan" , Cc: Morning all, > > I have gnu-win32 b19.1 > > > > In bash, when I Control-C, hoping to kill the current app, > > I kill all apps I spawned off bash, including emacs sessions > > etc. No end of frustration. I can't figure out how to > > stop it. Any ideas? > > > > This is, I'm sure, a lame newbie question, but I can't > > figure it out. bash.info, archives, faq, all shed no insight. > > > > The problem seemed to occur between b18 and b19, since I > > don't remember it happening in b18. This behaviour is by design, and has to do with the way CTRL+C et al are handled under Win32. You may not like it, but... :-) Under Win32, a CTRL+C on a console is sent to all processes in the console's process group. By default, each new process inherits it's parent process group. To the best of my knowledge, there is no way to specify which process group you want to be in, you can just ask for either your parent's group or a new one when the process is created. (See the doc for CreateProcess.) I didn't use Cygwin stuff back in b18, but my guess is that back then things were set up to call CreateProcess with CREATE_NEW_PROCESS_GROUP turned on. Someone must have had a reason for changing this so that processes from a single console all share the same process group. I can't think why you'd want to do that, other than the fear of running out of process groups... -- Mike Grasso - mjg AT tusc DOT com DOT au TUSC P/L - 666 Doncaster Road, Doncaster, 3108, Australia ph +61 3 9840 4451 - fx +61 3 9840 2277 - mb +61 4 1619 4954 - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".