interrupted system calls
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Mon Oct 28 05:21:00 EST 2002
Alastair Reid <alastair at reid-consulting-uk.ltd.uk> writes:
> It sounds a little like a problem I had where trap 26 (I think this is
> a timer signal) was interrupting the subprocess. Nowadays I use this
> function:
>
> my_system :: String -> IO ExitCode
> my_system xs = do
> -- putStrLn xs -- for debugging
> -- Bugfix for ghc (may not be needed in recent versions of GHC)
> rc <- System.system ("trap '' 26; " ++ xs)
> unless (rc == ExitSuccess) $ putStrLn xs
> return rc
Thanks, that seems to fix it. Maybe someone should merge this fix
into ghc's CVS tree?
Regards,
Malcolm
More information about the Glasgow-haskell-bugs
mailing list