From: Ray Strode Date: Wed, 16 May 2007 21:43:20 +0000 (-0400) Subject: Make ply_fd_has_data return false on hangups X-Git-Tag: 0.1.0~290 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73ec13dacbad0468269dc0e7a6a1d1fce7fb3a08;p=thirdparty%2Fplymouth.git Make ply_fd_has_data return false on hangups --- diff --git a/src/ply-utils.c b/src/ply-utils.c index b793c614..4605114b 100644 --- a/src/ply-utils.c +++ b/src/ply-utils.c @@ -83,7 +83,9 @@ ply_fd_has_data (int fd) poll_data.revents = 0; result = poll (&poll_data, 1, 10); - return result == 1; + return result == 1 + && ((poll_data.revents & POLLIN) + || (poll_data.revents & POLLPRI)); } bool