------art_15446_30848848.1162406150428
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 11/1/06, Bill Kelly <billk / cts.com> wrote:
>
>  Windows will be a problem.  Admittedly, I haven't tried
> ruby 1.8.5 yet, which has new nonblock_* methods.  However,
> my expectation is that you'll only get nonblocking behavior
> on windows from sockets, not from pipes.
>
> On Windows, calling select() on a pipe, always returns
> immediately with "data ready to read", regardless if there's
> any data there or not.
>
> This has been the bane of my existence on Windows ruby for
> 5 or 6 years.  I do IPC on Windows ruby using TCP over
> loopback, instead of pipes, in order to get nonblocking
> semantics.  (That still doesn't help for reading from the
> console, though... (search the archives for 'kbhit' for a
> partial solution there...))
>
> One of these years, I'd like to chat with a Windows guru
> and ask how he/she would recommend making a select() that
> works on both sockets and pipes on Windows.  Ruby could
> *really* use one.
>
>
> Regards,
>
> Bill
>
>
>
>


I think part of the problem here is that on Windows, functions like _pipe()
were added primarily as hacks to make it easier to migrate programs from
Unix, and never completely implemented. It may be too much to ask for them
to play nice in the sandbox with select().

------art_15446_30848848.1162406150428--