
Quoth "Bryan O'Sullivan"
That's right. There's unfortunately a ton of library code out there that was written by people who don't know when EINTR can bite, and the mysql client library happens to be the most prominent one that affects the Haskell world.
I wouldn't bet my life all the failures that come with the runtime timer signals are due to code that erroneously neglects to handle EINTR. We had someone here with a weird problem on some version of Solaris, where cabal aborted in hGetContents, on a pipe, with error return EINTR (as seen in a system trace.) No timer signals (GHCRTS=-v0), problem solved. I don't know what the code looks like there, but I'm pretty sure cabal has worked for others, and as far as I know no one has a clue what happened there. I haven't been able to track down my own problem with timer signals, in code that runs native GUI libraries on the Haiku operating system. The obvious thing (read message port) does retry on interrupt, but who knows what else ... waiting on a semaphore, something like that? Normal applications on Haiku, needless to say, are not bombarded with signals in this manner, so ... well, GHCRTS=-v0, problem solved. Maybe over time, Haskell programmers will clean up all those problems in the foreign code they want to run. Donn Cave, donn@avvanta.com