diff options
author | Julien Cristau <jcristau@debian.org> | 2010-02-02 14:45:17 +0100 |
---|---|---|
committer | Julien Cristau <jcristau@debian.org> | 2010-02-05 20:16:10 +0100 |
commit | b7af1cef38d1995289acd1f2c13580b378ec0fc9 (patch) | |
tree | 01276b80e3afee66bdc5e1a35648b933a37657d3 | |
parent | 3fb0af21816b9f89c4b33e7cac5aad6d90bcc6c7 (diff) |
poll: check for POLLERR|POLLHUP in WaitForInput
X.Org bug#26383 <http://bugs.freedesktop.org/26383>
Acked-by: Juliusz Chroboczek <jch@pps.jussieu.fr>
Signed-off-by: Julien Cristau <jcristau@debian.org>
-rw-r--r-- | sys.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -102,9 +102,9 @@ waitForInput(int fd1, int fd2) return -1; ret = 0; - if(pfd[0].revents & POLLIN) + if(pfd[0].revents & (POLLIN | POLLERR | POLLHUP)) ret |= 1; - if(pfd[1].revents & POLLIN) + if(pfd[1].revents & (POLLIN | POLLERR | POLLHUP)) ret |= 2; return ret; } |