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   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to