[GHC] #7839: After forkIO'ing on Intel Mac, putStrLn (presumably) reports "hPutChar: failed (Operation not supported)"
GHC
cvs-ghc at haskell.org
Mon Apr 15 20:55:06 CEST 2013
#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
More information about the ghc-tickets
mailing list