Re: SIGPIPE in the GHC runtime

2010-08-25 Thread Brian Bloniarz
On 08/23/2010 07:15 AM, Ian Lynagh wrote: Could someone summarise this thread in a ticket in the GHC trac? http://hackage.haskell.org/trac/ghc/ticket/4274 HTH, Brian ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

Re: SIGPIPE in the GHC runtime

2010-08-23 Thread Ian Lynagh
Could someone summarise this thread in a ticket in the GHC trac? http://hackage.haskell.org/trac/ghc/ Thanks Ian ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: SIGPIPE in the GHC runtime

2010-08-23 Thread Brian Bloniarz
On 08/23/2010 07:15 AM, Ian Lynagh wrote: Could someone summarise this thread in a ticket in the GHC trac? http://hackage.haskell.org/trac/ghc/ I'd be happy to, I'll follow up as soon as I can find time. Thanks, -Brian ___ Glasgow-haskell-users

Re: SIGPIPE in the GHC runtime

2010-08-18 Thread Donn Cave
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

Re: SIGPIPE in the GHC runtime

2010-08-18 Thread Brian Bloniarz
On 08/18/2010 04:55 PM, Donn Cave wrote: 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

Re: SIGPIPE in the GHC runtime

2010-08-18 Thread Donn Cave
Quoth Brian Bloniarz brian.bloni...@gmail.com, ... I just tested linux in this scenario, it gives EPIPE as I'd expect. Linux's SA_RESTART has been reliable in my limited experience. Do you have an OpenSolaris install to test by any chance? The code is below. No, sorry! But I don't doubt that

Re: SIGPIPE in the GHC runtime

2010-08-18 Thread Brian Bloniarz
On 08/18/2010 07:06 PM, Donn Cave wrote: Quoth Brian Bloniarz brian.bloni...@gmail.com, ... I just tested linux in this scenario, it gives EPIPE as I'd expect. Linux's SA_RESTART has been reliable in my limited experience. Do you have an OpenSolaris install to test by any chance? The code is

SIGPIPE in the GHC runtime

2010-08-17 Thread Brian Bloniarz
The GHC runtime ignores SIGPIPE by setting the signal to SIG_IGN. This means that any subprocesses (created via System.Process or otherwise) will also have their SIGPIPE handler set to SIG_IGN; I think this might be a bug. The Python runtime does the same thing, there's a good explanation