Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Tue, 8 May 2001 17:58:44 -0400 From: Christopher Faylor To: "'cygwin AT cygwin DOT com'" Subject: Re: Brainstorming a fix for CTRL-C handling in an emacs shell buf fer (non-TTY) Message-ID: <20010508175844.A27114@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: "'cygwin AT cygwin DOT com'" References: <8F23E55D511AD5119A6800D0B76FDDE11E102B AT cpex3 DOT channelpoint DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.11i In-Reply-To: <8F23E55D511AD5119A6800D0B76FDDE11E102B@cpex3.channelpoint.com>; from troy.noble@channelpoint.com on Tue, May 08, 2001 at 03:38:38PM -0600 On Tue, May 08, 2001 at 03:38:38PM -0600, Troy Noble wrote: >> >Exactly. I am using FSF NT Emacs 20.7.1, which is a native win32 GUI >app. >> >However, the fact that it creates a console is probably what's confusing >> >cygwin's bash, right? >> >> I would not call it confused. It is working as designed. > >Agreed if I understand you correctly. So, you would classify FSF NT >Emacs as not being a "pure windows" app, at least not from bash's >perspective... since it creates a console. If so, that makes sense. > > >> >> Are you using a Cygwin version of bash? Why is it ignoring SIGINT? >> >> ctrl_c_handler in bash should be sending CTRL-Cs to its children. >> > >> >I've tried with both: 2.05.0(5)-release and 2.04.7(2)-release >> >that I used cygwin's setup.exe to install. >> > >> >And I have mis-spoken again. I think bash DOES send CTRL-C's to >> >its children, since I see each of them pop into their ctrl_c_handler. > >> Actually, I misspoke. The question is why isn't bash sending SIGINTs >> to its children. The CTRL-Cs come from Windows. > >The subprocesses do seem to get the SIGINT. So why aren't they >responding to it and killing themselves correctly? > >I ran bash, set CYGWIN_SLEEP=15000, typed "ls -lR", attached to >the process, told gdb to continue, then went to my bash shell and >hit CTRL-C. > >I immediately got a SIGINT in the child process, even before its >CTRL-C handler got invoked. That's a "Windows" SIGINT, which is the only thing that gdb can detect. A Cygwin SIGINT is a different thing entirely. Since Cygwin has the full complement of Windows signals, it uses another complicated method for sending signals between processes. Running in strace would tell whether you received a SIGINT or not. You'd see the signal_thread responding to a SIGINT. cgf -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple