From: cgf AT cygnus DOT com (Christopher Faylor) Subject: Re: Nonblocking serial reads 15 Apr 1998 21:23:01 -0700 Message-ID: <199804160402.AAA17903.cygnus.cygwin32.developers@tweedledumb.cygnus.com> To: cygwin32-developers AT cygnus DOT com, noer AT cygnus DOT com Cc: keiths AT cygnus DOT com >I've been working on the problem of what should be non-blocking >serial I/O in GDB blocking, preventing GDB from receiving signals >when it should. The culprit is the fhandler_serial class which >currently always blocks in reads/writes. > >It looks like the solution has already been implemented in tty.cc (see >fhandler_tty_slave::read). Where should this code actually be? Could >we just make it more generic and then move it to fhandler_base? I have a generic solution (I think) to the problem of non-blocking reads which I hope to check in in the next couple of days. I do all I/O from a separate thread, killing the thread if there is a signal which should interrupt the I/O. I've been using this in my own copy of cygwin.dll for a couple of months and several net users have been using it with no reported ill effects. This should actually obsolete the tty code which attempts to do the same thing. cgf