This legacy header appears to be unused. Removing its includes
avoids numerous warnings when compiling with musl libc:
/usr/include/sys/signal.h:1:2: warning: #warning redirecting incorrect #include <sys/signal.h> to <signal.h> [-Wcpp]
There was hardcoded 4096 for threads size, but below there was:
assertm(fd >= 0 && fd < FD_SETSIZE,
"get_handler: handle %d >= FD_SETSIZE %d",
fd, FD_SETSIZE);
if_assert_failed return NULL;
which fails for fd > 1024 (1024 was previous value of FD_SETSIZE)
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.