Problem with select(2) in single threaded runtime.

Herbert Valerio Riedel hvriedel at
Tue Nov 4 17:32:30 UTC 2014

On 2014-11-04 at 18:18:44 +0100, Merijn Verstraaten wrote:


> This exits with EINVAL for me on OSX, if I replace INT_MAX with 1000,
> it runs just fine. The man page on OSX mentions EINVAL for values that
> exceed the maximum timeout, so it looks like OSX is not following the
> spec, then...

Btw, I also stumbled over these ancient bug-reports:

So it seems that BSD-ish systems have (or had?) this arbitrary 1e8
second limit in combination with the questionable EINVAL response which
seems in conflict with the POSIX specification.

I'm wondering if there's already an Autoconf test somewhere we could
steal for detecting this peculiarity of select() on BSD systems...


More information about the ghc-devs mailing list