From ec9e2591a778c14818159feed1f46d1063c0bf30 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Tue, 2 Feb 2010 14:45:17 +0100 Subject: [PATCH] poll: check for POLLERR|POLLHUP in WaitForInput X.Org bug#26383 --- sys.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys.c b/sys.c index 0a50103..e22b69d 100644 --- a/sys.c +++ b/sys.c @@ -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; } -- 1.6.5