bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: non-blocking I/O


From: Eric Blake
Subject: Re: non-blocking I/O
Date: Wed, 30 Mar 2011 12:01:35 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9

On 03/30/2011 11:46 AM, Eric Blake wrote:
> On 03/29/2011 09:16 AM, Bruno Haible wrote:
>> Paolo Bonzini wrote:
>>> Without guessing what your bias is, I also :) prefer to implement 
>>> {g,s}et_nonblock_flag functions.  It would use either 
>>> SetNamedPipeHandleState or ioctlsocket (using the socket detection trick 
>>> in sockets.c to detect sockets, and then GetFileType to detect pipes if 
>>> it fails).
>>
>> Here's proposed code to that effect.
> 
> Let's get it checked in.
> 
>>  Note that the getter function cannot
>> be implemented: How to determine whether a Woe32 socket is non-blocking?
> 
> I don't know.

Then again, since gnulib is _already_ wrapping all Woe32 sockets into a
nicer fd, we could maintain an external table of the blocking status of
all sockets that we have created (similar to how we already create an
external table of directory fds for emulating fchdir()).  [Or even
modify the existing fchdir table to serve multiple purposes, since we've
already hooked dup(), fcntl(), and other functions into updating that
table as necessary]

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]