From f187e0cea89b368c1af7cdbb627cdd34c308685c Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Tue, 27 Dec 2005 18:38:43 +0000 Subject: [PATCH] defect 999 clm library doesn't exit from poll when executive crashes git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@870 fd59a12c-fef9-0310-b244-a6a79926bd2f --- lib/clm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/clm.c b/lib/clm.c index 700c72e7..1be8ffe1 100644 --- a/lib/clm.c +++ b/lib/clm.c @@ -240,6 +240,11 @@ saClmDispatch ( goto error_unlock; } + if ((ufds.revents & (POLLERR|POLLHUP|POLLNVAL)) != 0) { + error = SA_AIS_ERR_BAD_HANDLE; + goto error_unlock; + } + dispatch_avail = ufds.revents & POLLIN; if (dispatch_avail == 0 && dispatchFlags == SA_DISPATCH_ALL) { pthread_mutex_unlock (&clmInstance->dispatch_mutex);