Преглед изворни кода

cov 10373: check poll return value

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2844 fd59a12c-fef9-0310-b244-a6a79926bd2f
Angus Salkeld пре 15 година
родитељ
комит
b1d84f9ecc
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      lib/coroipcc.c

+ 5 - 1
lib/coroipcc.c

@@ -567,7 +567,11 @@ retry_semwait:
 		pfd.fd = ipc_instance->fd;
 		pfd.events = 0;
 
-		poll (&pfd, 1, 0);
+		res = poll (&pfd, 1, 0);
+
+		if (res == -1 && errno != EINTR) {
+			return (CS_ERR_LIBRARY);
+		}
 		if (pfd.revents == POLLERR || pfd.revents == POLLHUP) {
 			return (CS_ERR_LIBRARY);
 		}