fdReady: use poll() instead of select()
authorSimon Marlow <marlowsd@gmail.com>
Fri, 2 Dec 2016 19:32:24 +0000 (14:32 -0500)
committerBen Gamari <ben@smart-cactus.org>
Fri, 2 Dec 2016 20:29:15 +0000 (15:29 -0500)
commitf46369b8a1bf90a3bdc30f2b566c3a7e03672518
treee079fd989de14d49cb88e88472b2b195729f3b31
parent27731f144fb676d3117cd7e04eb71c13d53bb170
fdReady: use poll() instead of select()

select() is limited to 1024 file descriptors.  This actually blew up
in a very hard-to-debug way in our production system when using the
hinotify package.

Test Plan:
libraries/tests pass, paricularly hGetBuf001 which exercises this
code.

Reviewers: niteria, erikd, austin, hvr, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2785

GHC Trac Issues: #12912
libraries/base/cbits/inputReady.c