[GHC] #7839: After forkIO'ing on Intel Mac, putStrLn (presumably) reports "hPutChar: failed (Operation not supported)"

#7839: After forkIO'ing on Intel Mac, putStrLn (presumably) reports "hPutChar: failed (Operation not supported)" ----------------------------------------+----------------------------------- Reporter: thorkilnaur | Owner: Type: bug | Status: new Priority: normal | Component: Runtime System Version: 7.7 | Keywords: Os: MacOS X | Architecture: x86 Failure: Incorrect result at runtime | Blockedby: Blocking: | Related: ----------------------------------------+----------------------------------- Investigating #7715 on the tn23 builder, which is {{{ $ uname -a Darwin thorkil-naurs-intel-mac-mini.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 $ }}} I ran into: {{{ $ cat T7715O.hs import Control.Monad import Control.Concurrent import System.IO import System.Environment main' c d2 = do replicateM_ c $ forkIO $ do putStrLn "Hello, world!" threadDelay d2 mainArgsInterpret [cS,d2S] = main' (read cS) (read d2S) main :: IO () main = do hSetBuffering stdout NoBuffering hSetBuffering stderr NoBuffering args <- getArgs mainArgsInterpret args $ /Users/thorkilnaur/tn/builders/GHCBuilder/tn23/builder/tempbuild/build/inplace/bin /ghc-stage2 --make T7715O.hs -threaded -debug -rtsopts [1 of 1] Compiling Main ( T7715O.hs, T7715O.o ) Linking T7715O ... $ ./T7715O 25 10000000 Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! HeT7715O: <stdout>: hPutChar: failed (Operation not supported) T7715O: <stdout>: hPutChar: failed (Operation not supported) $ }}} This doesn't happen on {{{ $ uname -a Linux tn24 3.2.0-39-generic #62-Ubuntu SMP Wed Feb 27 22:05:17 UTC 2013 i686 i686 i386 GNU/Linux $ }}} Best regards Thorkil -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7839 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7839: After forkIO'ing on Intel Mac, putStrLn (presumably) reports "hPutChar: failed (Operation not supported)" ----------------------------------------+----------------------------------- Reporter: thorkilnaur | Owner: Type: bug | Status: new Priority: normal | Component: Runtime System Version: 7.7 | Keywords: Os: MacOS X | Architecture: x86 Failure: Incorrect result at runtime | Blockedby: Blocking: | Related: ----------------------------------------+----------------------------------- Changes (by PHO): * cc: pho@… (added) -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7839#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7839: After forkIO'ing on Intel Mac, putStrLn (presumably) reports "hPutChar: failed (Operation not supported)" ----------------------------------------+----------------------------------- Reporter: thorkilnaur | Owner: Type: bug | Status: new Priority: normal | Component: Runtime System Version: 7.7 | Keywords: Os: MacOS X | Architecture: x86 Failure: Incorrect result at runtime | Blockedby: Blocking: | Related: ----------------------------------------+----------------------------------- Comment(by PHO): This must be a duplicate of #7773 since ``kevent(2)`` in Darwin 9.8.0 doesn't support tty. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7839#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7839: After forkIO'ing on Intel Mac, putStrLn (presumably) reports "hPutChar: failed (Operation not supported)" ----------------------------+----------------------------------------------- Reporter: thorkilnaur | Owner: Type: bug | Status: closed Priority: normal | Component: Runtime System Version: 7.7 | Resolution: duplicate Keywords: | Os: MacOS X Architecture: x86 | Failure: Incorrect result at runtime Blockedby: | Blocking: Related: | ----------------------------+----------------------------------------------- Changes (by thorkilnaur): * status: new => closed * resolution: => duplicate Comment: Replying to [comment:2 PHO]:
This must be a duplicate of #7773 since ``kevent(2)`` in Darwin 9.8.0 doesn't support tty. You are absolutely right: Applying the fix of #7773 makes this problem go away.
Best regards Thorkil -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7839#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC