Quoth Brian Bloniarz <brian.bloni...@gmail.com>,

> IMHO the simplest fix is the patch below: simply
> avoid SIG_IGN, instead install a handler which does nothing.
> This way, an exec() restores the handler to SIG_DFL. I've
> included a testcase too.

I don't know enough to make a case for or against this, but the
side effects are different:  whether the handler does anything
or not, it will interrupt some system calls.  Since there are
already may be a regular barrage of SIGALRMs from the GHC runtime,
maybe one more such interruption can't hurt anything ...  but
note that we recently heard from someone in Australia with a
problem on OpenSolaris where evidently these SIGALRMs were in
fact interrupting hGetContents from a pipe, and no one seemed
to have any notion why.

At any rate, the affected system calls would set EAGAIN, possibly
including the write(2) that's supposed to set EPIPE (though
I think that would be an unusual implementation.)

        Donn Cave, d...@avvanta.com
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to