Re: Problem with select() on console

2010-07-15 Thread Christopher Faylor
On Thu, Jul 15, 2010 at 09:54:21AM +0200, Matthias Andree wrote: >Am 15.07.2010, 07:49 Uhr, schrieb Christopher Faylor: > >> On Thu, Jul 15, 2010 at 01:44:19AM +0100, Cliff Hones wrote: >>> When select() is used to test for input availability on the standard >>> cygwin console in normal (cooked) mo

Re: Problem with select() on console

2010-07-15 Thread Christopher Faylor
On Thu, Jul 15, 2010 at 01:45:43PM +0100, Cliff Hones wrote: >Cliff Hones wrote: >> I must look at the console source... > >And now I have, and I see that fhandler_console does its own line >editing, so is perfectly aware of the input line state. So blocking as >soon as any key is typed seems a sh

Re: Problem with select() on console

2010-07-15 Thread Andy Koppe
On 15 July 2010 12:57, Cliff Hones wrote: >> On Thu, Jul 15, 2010 at 01:44:19AM +0100, Cliff Hones wrote: >>> When select() is used to test for input availability on the standard >>> cygwin console in normal (cooked) mode, it indicates input is available >>> as soon as any key is pressed.  However,

Re: Problem with select() on console

2010-07-15 Thread Cliff Hones
Cliff Hones wrote: > I must look at the console source... And now I have, and I see that fhandler_console does its own line editing, so is perfectly aware of the input line state. So blocking as soon as any key is typed seems a shortcoming of cygwin, not windows? I see there may be a difficulty w

Re: Problem with select() on console

2010-07-15 Thread Cliff Hones
Christopher Faylor wrote: > On Thu, Jul 15, 2010 at 01:44:19AM +0100, Cliff Hones wrote: >> When select() is used to test for input availability on the standard >> cygwin console in normal (cooked) mode, it indicates input is available >> as soon as any key is pressed. However, a call to read(0,..

Re: Problem with select() on console

2010-07-15 Thread Matthias Andree
Am 15.07.2010, 07:49 Uhr, schrieb Christopher Faylor: On Thu, Jul 15, 2010 at 01:44:19AM +0100, Cliff Hones wrote: When select() is used to test for input availability on the standard cygwin console in normal (cooked) mode, it indicates input is available as soon as any key is pressed. However

Re: Problem with select() on console

2010-07-14 Thread Christopher Faylor
On Thu, Jul 15, 2010 at 01:44:19AM +0100, Cliff Hones wrote: >When select() is used to test for input availability on the standard >cygwin console in normal (cooked) mode, it indicates input is available >as soon as any key is pressed. However, a call to read(0,...) >will (correctly) block until a

Problem with select() on console

2010-07-14 Thread Cliff Hones
When select() is used to test for input availability on the standard cygwin console in normal (cooked) mode, it indicates input is available as soon as any key is pressed. However, a call to read(0,...) will (correctly) block until a terminating RETURN is entered. select() should only indicate in