On Sun, May 16, 2010 at 11:48:26AM -0700, Steven Dake wrote:
> 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.
> 
Ok, I have made it like the other recveive function.
If it is interrupted it will "retry_semwait".

-Angus

Index: lib/coroipcc.c
===================================================================
--- lib/coroipcc.c      (revision 2840)
+++ lib/coroipcc.c      (working copy)
@@ -567,10 +567,14 @@
                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 && errno != EINTR) {
                        return (CS_ERR_LIBRARY);
                }
+               if (res == -1 || pfd.revents == POLLERR || pfd.revents == 
POLLHUP) {
+                       return (CS_ERR_LIBRARY);
+               }
 
                goto retry_semwait;
        }

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

Reply via email to