delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/06/05/11:35:11

From: chamas AT alumni DOT stanford DOT org (Joshua Chamas)
Subject: Re: Control-C, Bash, Command Kill, Bug, Ctrl-C
5 Jun 1998 11:35:11 -0700 :
Message-ID: <357730D0.70BBC24.cygnus.gnu-win32@alumni.stanford.org>
References: <001501bd900e$422eb0e0$7fb002cb AT mjg DOT tusc DOT com DOT au>
Reply-To: chamas AT alumni DOT stanford DOT org
Mime-Version: 1.0
To: mjg AT tusc DOT com DOT au
Cc: Frank Kuan <kuan AT agames DOT com>, gnu-win32 AT cygnus DOT com

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

Mike,

Thanks for the informed opinion!  Fortunately, I was able to 
download and get tcsh to work.  Not only does the Control-C
work unix style, but Control-Z (suspend) does too!  Yeah.

Unfortunately... neither tcsh, nor bash b18 support //drive-letter/
notation.  Ideally whoever does these things would fix that
Win32 API with Control-C hitting all group processes.  It does not
make sense in cygwin32, since there is no concept of backgrounding
from a shell in Win32, right?  So then the API never meant
for any more than 2 processes to be in that group, the shell, and 
the program run from it.

b19 bash would be nice to use, but it's too much a pain in the butt
with that control-c "feature".

Thanks again.  Leave in to Win32 API's to not make sense.

Joshua


Mike Grasso wrote:
> 
> 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.
> 
> 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".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019