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:22:39 -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: <20010508172239.E26609@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: "'cygwin AT cygwin DOT com'" References: <8F23E55D511AD5119A6800D0B76FDDE11E1029 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: <8F23E55D511AD5119A6800D0B76FDDE11E1029@cpex3.channelpoint.com>; from troy.noble@channelpoint.com on Tue, May 08, 2001 at 03:05:58PM -0600 On Tue, May 08, 2001 at 03:05:58PM -0600, Troy Noble wrote: >> The "it" I was referring to was the setting of the controlling tty. >> set_console_ctty calls get_tty_stuff. get_tty_stuff is called early >> in fhandler_console::open. > >I see what you're saying now. I find it curious that set_console_ctty >calls get_tty_stuff with no argument, so the flags are 0. Can that be good? >In particular, the call to > > shared_console_info->set_ctty (TTY_CONSOLE, flags); > >will always have flags==0 when called from set_console_ctty, and in >tty_min::set_ctty (fhandler_termios.cc:87) > > if ((myself->ctty < 0 || myself->ctty == ttynum) && !(flags & O_NOCTTY)) > >!(flags & O_NOCTTY) evaluates to TRUE every time. Zero is correct. It is called with an argument where appropriate, like in fhandler_console::open. >> No. nada is intended for cases where there is no console device as in >> when a program is invoked from a pure Windows application or when it is >> running in a service. In this case, the terminal should not have any >> controlling tty. > >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. >> 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. cgf -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple