On Thu, Apr 8, 2010 at 8:29 PM, Alexandre Julliard wrote:
> Mike Kaplinskiy writes:
>
>> This won't work for implementing half-closed sockets. If we have only
>> the read half is closed, we will get POLLIN/0 recv indefinitely if we
>> keep polling (not POLLHUP). If we remove it from the loop, we
Mike Kaplinskiy writes:
> This won't work for implementing half-closed sockets. If we have only
> the read half is closed, we will get POLLIN/0 recv indefinitely if we
> keep polling (not POLLHUP). If we remove it from the loop, we have to
> keep polling (once in a while, i.e. when an enable_sock
On Thu, Apr 8, 2010 at 11:16 AM, Alexandre Julliard wrote:
> Mike Kaplinskiy writes:
>
>> But I see your point that perhaps it doesn't belong in the main loop
>> when one of the halves gets closed. I guess we can keep sock_try_event
>> around but only use it when the socket has been removed from
Mike Kaplinskiy writes:
> But I see your point that perhaps it doesn't belong in the main loop
> when one of the halves gets closed. I guess we can keep sock_try_event
> around but only use it when the socket has been removed from the main
> loop. I'll also add detection of half-closed connection
On Tue, Apr 6, 2010 at 2:03 PM, Alexandre Julliard wrote:
> Mike Kaplinskiy writes:
>
>> Would allowing adding the fd to the poll loop after it has been
>> removed be more sane? Otherwise we have to resort to ugly things like
>> sock_try_event (which only half work).
>
> I don't think that makes
Mike Kaplinskiy writes:
> Would allowing adding the fd to the poll loop after it has been
> removed be more sane? Otherwise we have to resort to ugly things like
> sock_try_event (which only half work).
I don't think that makes sense either. The error condition is not going
to go away so you can
On Tue, Apr 6, 2010 at 1:08 PM, Alexandre Julliard wrote:
> Mike Kaplinskiy writes:
>
>> Remove the fd from the poll list so we don't get POLLHUP/POLLERR
>> messages when we ask for no events
>
> This is wrong, even when selecting for no events you want to receive
> POLLHUP/POLLERR. If you really
Mike Kaplinskiy writes:
> Remove the fd from the poll list so we don't get POLLHUP/POLLERR
> messages when we ask for no events
This is wrong, even when selecting for no events you want to receive
POLLHUP/POLLERR. If you really don't want any events you have to use -1
to remove the fd from the l