This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: 1.7.9-1: typeahead queue not flushed when Ctrl+C pressed


On Thu, Apr 14, 2011 at 13:21, Andy Koppe <andy.koppe@gmail.com>
wrote:
> Yep, looks like the NOFLSH bit is ignored. There's no mention of
> it in the Cygwin sources except in sys/termios.h.
>
> Have you confirmed that it behaves as expected on Linux?

This is an ancient part of the line discipline. It predates UNIX,
going back to its ancestors.* In the case of Linux, I tried it most
recently with Ubuntu 8.04.4 LTS, with a 2.6.24-23-xen kernel.
Pressing Ctrl+C clears the input queue and returns the user to the
prompt.

Historically, the terminal driver is one of the most complicated
beasties in a system, so I am doubtful of my ability to come up with
a working patch on my own. Is someone available to help me who groks
the Cygwin code for the line discipline?

Cheers,

MetaEd

* On UNIX, I can confirm from memory that it behaves as expected
back to SunOS 4; the same for contemporary versions of IRIX, Ultrix,
Concentrix, Clix, AIX, SCO, and HP-UX. Cousins of UNIX (such as VMS
and its ancestors) also clear typeahead and return to prompt on
interrupt. For whatever reason, it seems Windows XP does not clear
typeahead, so typeahead is more or less a disaster in the making. I
suppose it has been the same all the way back to DOS, and it is just
too bad Microsoft engineers did not carry the fix over from VMS to
Windows NT when they had the chance.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      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]