Opened 2 years ago

Closed 2 years ago

#7839 closed bug (duplicate)

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

Reported by: thorkilnaur Owned by:
Priority: normal Milestone:
Component: Runtime System Version: 7.7
Keywords: Cc: pho@…
Operating System: MacOS X Architecture: x86
Type of failure: Incorrect result at runtime Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

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

Change History (3)

comment:1 Changed 2 years ago by PHO

  • Cc pho@… added

comment:2 follow-up: Changed 2 years ago by PHO

This must be a duplicate of #7773 since kevent(2) in Darwin 9.8.0 doesn't support tty.

comment:3 in reply to: ↑ 2 Changed 2 years ago by thorkilnaur

  • Resolution set to duplicate
  • Status changed from new to closed

Replying to 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

Note: See TracTickets for help on using tickets.