소스 검색

Merge trunk revision 2844:
r2844 | asalkeld | 2010-05-16 16:35:45 -0700 (Sun, 16 May 2010) | 2 lines

cov 10373: check poll return value



git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2886 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake 15 년 전
부모
커밋
37859c3027
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);
 		}