This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Brainstorming a fix for CTRL-C handling in an emacs shell buf fer (non-TTY)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]