diff options
| author | Ray Strode <rstrode@redhat.com> | 2007-05-16 17:43:20 -0400 |
|---|---|---|
| committer | Ray Strode <rstrode@redhat.com> | 2007-05-16 17:43:20 -0400 |
| commit | 73ec13dacbad0468269dc0e7a6a1d1fce7fb3a08 (patch) | |
| tree | 2cbd6ba1b1c27cdfa32a410643c72135a7c42cf5 /src | |
| parent | 73879cdf3c4e7c5bd386800809a120c73ed930a1 (diff) | |
Make ply_fd_has_data return false on hangups
Diffstat (limited to 'src')
| -rw-r--r-- | src/ply-utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ply-utils.c b/src/ply-utils.c index b793c61..4605114 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 |
