Compiling with -threaded under Solaris 10

Florian Lorenzen florenz at cs.tu-berlin.de
Fri Jun 23 11:33:16 EDT 2006


Hi all,

I'm trying to run the following program on Solaris 10 with GHC 6.4.1
(6.4.2 does not really work under Solaris 10 right now).

module Main where

import IO
import Control.Concurrent
import System.Process

main =
    do (inp, out, err, ph) <- runInteractiveProcess "cat" [] Nothing
Nothing
       forkIO (do hPutStr inp "this\nis\na\ntest\n"
                  hClose inp)
       forkIO (do r <- hGetContents out
                  putStr r)
       waitForProcess ph

I compile it with

$ ghc -o try Try2.hs -threaded -lrt

When running, I get

$ ./try  
try: waitForProcess: interrupted (Interrupted system call)

and the program aborts.

Under Linux, everything is fine.

Do I have to set some macros explicitly? And if so, which ones? Any help
appreciated.

Best regards,

Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 185 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/glasgow-haskell-users/attachments/20060623/cd9bf5ab/attachment.bin


More information about the Glasgow-haskell-users mailing list