This patch isn't correct.

poll can return -1 (errno=EINTR) which means interrupted by signal and
should retry.  Test for that errno and retry in that case.

Regards
-steve

On Sun, 2010-05-16 at 18:40 +1000, Angus Salkeld wrote:
> Signed-off-by: Angus Salkeld <asalk...@redhat.com>
> ---
>  lib/coroipcc.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/coroipcc.c b/lib/coroipcc.c
> index 1e93b25..c66d687 100644
> --- a/lib/coroipcc.c
> +++ b/lib/coroipcc.c
> @@ -551,8 +551,8 @@ retry_semwait:
>               pfd.fd = ipc_instance->fd;
>               pfd.events = 0;
>  
> -             poll (&pfd, 1, 0);
> -             if (pfd.revents == POLLERR || pfd.revents == POLLHUP) {
> +             res = poll (&pfd, 1, 0);
> +             if (res == -1 || pfd.revents == POLLERR || pfd.revents == 
> POLLHUP) {
>                       return (CS_ERR_LIBRARY);
>               }
>  

_______________________________________________
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to