Hurd bug 22861: Do not select() exceptions from pipes.
commita0d624cd615702d041387b29d00f5128c900e567
authorKalle Olavi Niemitalo <kon@iki.fi>
Sun, 7 Sep 2008 19:30:40 +0000 (7 22:30 +0300)
committerKalle Olavi Niemitalo <Kalle@Astalo.kon.iki.fi>
Sun, 7 Sep 2008 19:52:47 +0000 (7 22:52 +0300)
treeaa924b1222147403ef4364bec7a6e22220743176
parentb94657869bc90b5c42693c28c472f041a80fced1
Hurd bug 22861: Do not select() exceptions from pipes.

The GNU Hurd has a bug that can make select() report an exception in a
pipe even though none has actually occurred.  The typical result is
that ELinks closes the pipe through which it internally passes all
input events, such as keypresses.  It then no longer reacts to what
the user is trying to do.

Work around the Hurd bug by making set_handlers() check whether the
file descriptor refers to a pipe, and if so, pretend the caller did
not provide any handler for exceptions.  This is a minimal change that
avoids slowing down the select() loop itself and does not require
careful analysis of the callers to statically find out which file
descriptors might refer to pipes.  The extra stat() calls may slow
ELinks down somewhat, but anyway it'll work better than it did without
the patch, and if the Hurd bug is ever fixed, we can remove the
workaround at that time.
NEWS
src/main/select.c