[commit: unix] ghc-7.6: Fix signals004 on OS X 32 (cd2a071)

Ian Lynagh igloo at earth.li
Fri Jan 18 00:20:36 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/packages/unix

On branch  : ghc-7.6

http://hackage.haskell.org/trac/ghc/changeset/cd2a071de52f56bba73a56b79e881c91f1e8dc2e

>---------------------------------------------------------------

commit cd2a071de52f56bba73a56b79e881c91f1e8dc2e
Author: Ian Lynagh <ian at well-typed.com>
Date:   Thu Jan 17 21:43:06 2013 +0000

    Fix signals004 on OS X 32

>---------------------------------------------------------------

 tests/signals004.hs |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/tests/signals004.hs b/tests/signals004.hs
index d822056..ee6ca85 100644
--- a/tests/signals004.hs
+++ b/tests/signals004.hs
@@ -1,4 +1,5 @@
 import Control.Concurrent
+import System.Info
 import System.Posix
 import Control.Monad
 
@@ -8,7 +9,11 @@ import Control.Monad
 installers = 50
 -- too many signals overflows the IO manager's pipe buffer, this seems
 -- to be the most we can get away with:
-sigs = 400
+sigs = if os == "darwin"
+       then 30 -- Otherwise we get "lost signal due to full pipe: 30"
+               -- errors after the timeout kills the hung process
+               -- for the threaded{1,2} ways
+       else 400
 
 main = do
   c <- newChan





More information about the ghc-commits mailing list