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

On places with POLLERR check also POLLNVAL

POLLNVAL is returned on invalid FD. We must also check it.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Jan Friesse 13 лет назад
Родитель
Сommit
105305a486
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      exec/coroipcs.c
  2. 1 1
      lib/coroipcc.c

+ 1 - 1
exec/coroipcs.c

@@ -1617,7 +1617,7 @@ int coroipcs_handler_dispatch (
 	/*
 	 * If an error occurs, request exit
 	 */
-	if (revent & (POLLERR|POLLHUP)) {
+	if (revent & (POLLERR|POLLHUP|POLLNVAL)) {
 		ipc_disconnect (conn_info);
 		return (0);
 	}

+ 1 - 1
lib/coroipcc.c

@@ -902,7 +902,7 @@ coroipcc_dispatch_get (
 		error = CS_ERR_TRY_AGAIN;
 		goto error_put;
 	}
-	if (poll_events == 1 && (ufds.revents & (POLLERR|POLLHUP))) {
+	if (poll_events == 1 && (ufds.revents & (POLLERR|POLLHUP|POLLNVAL))) {
 		error = CS_ERR_LIBRARY;
 		goto error_put;
 	}