Просмотр исходного кода

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 лет назад
Родитель
Сommit
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);
 		}