Commit b7af1cef authored by Julien Cristau's avatar Julien Cristau

poll: check for POLLERR|POLLHUP in WaitForInput

X.Org bug#26383 <http://bugs.freedesktop.org/26383>
Acked-by: Juliusz Chroboczek's avatarJuliusz Chroboczek <jch@pps.jussieu.fr>
Signed-off-by: Julien Cristau's avatarJulien Cristau <jcristau@debian.org>
parent 3fb0af21
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment