Mail Archives: cygwin-developers/1998/04/15/19:53:21
From: Geoffrey Noer <noer AT cygnus DOT com>
Date: Wed, 15 Apr 1998 18:55:41 -0700 (PDT)
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'm not sure just what you are suggesting, but we don't want to be
screwing around like that when reading from a disk file. It would be
reasonable to move that code into some function which was called for
ttys and for serial ports. But note that you can't use PeekNamedPipe
on a serial port. So using asynchronous reads might be better from a
serial port. Polling is always an extremely bad idea. The tty code
only does it because Windows doesn't support asynchronous reads from
pipes.
Ian
- Raw text -