[Openais] PATCH: poll problem
Fabien THOMAS
fabien.thomas at netasq.com
Thu Aug 24 05:50:01 PDT 2006
in ipc.c i dont understand why the code ignore EAGAIN:
res = recvmsg (conn_info->fd, &msg_recv, MSG_NOSIGNAL);
if (res == -1 && errno == EINTR) {
goto retry_recv;
} else
if (res == -1 && errno != EAGAIN) {
return;
} else
if (res == 0) {
return;
}
...
why not this:
res = recvmsg (conn_info->fd, &msg_recv, MSG_NOSIGNAL);
if (res == -1) {
if (errno == EINTR || errno == EAGAIN)
goto retry_recv;
return;
} else
if (res == 0) {
return;
}
...
Le 24 août 06 à 14:33, Fabien THOMAS a écrit :
> POLLHUP and POLLERR is completly broken on many BSD OS.
> Even if the manpage say that it can return it the kernel does not
> handle this case...
>
> I've also added a missing close of a fd on error case.
>
> Any comment on the patch ?
>
> Fabien
>
>
> <patch-poll>
> _______________________________________________
> Openais mailing list
> Openais at lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/openais
More information about the Openais
mailing list