Re: [Haskell-cafe] system in forkIO

2008-09-14 Thread Andrea Rossato
On Sun, Sep 14, 2008 at 02:24:23PM -0300, Marco Túlio Gontijo e Silva wrote: and the result of ls only after I press a key. Does getChar blocks the other threads? yes, but you can use forkOS from Control.Concurrent and compile with -threaded. See the relevant documentation for the details.

Re: [Haskell-cafe] system in forkIO

2008-09-14 Thread Judah Jacobson
On Sun, Sep 14, 2008 at 10:24 AM, Marco Túlio Gontijo e Silva [EMAIL PROTECTED] wrote: When I run this code, I get fork and the result of ls only after I press a key. Does getChar blocks the other threads? I think this behavior is caused by (or at least related to) the following GHC bug:

Re: [Haskell-cafe] system in forkIO

2008-09-14 Thread Marco Túlio Gontijo e Silva
Em Dom, 2008-09-14 às 11:08 -0700, Judah Jacobson escreveu: On Sun, Sep 14, 2008 at 10:24 AM, Marco Túlio Gontijo e Silva [EMAIL PROTECTED] wrote: When I run this code, I get fork and the result of ls only after I press a key. Does getChar blocks the other threads? I think

Re: [Haskell-cafe] system in forkIO

2008-09-14 Thread Jules Bean
Andrea Rossato wrote: On Sun, Sep 14, 2008 at 02:24:23PM -0300, Marco Túlio Gontijo e Silva wrote: and the result of ls only after I press a key. Does getChar blocks the other threads? yes, but you can use forkOS from Control.Concurrent and compile with -threaded. See the relevant

Re: [Haskell-cafe] system in forkIO

2008-09-14 Thread Marco Túlio Gontijo e Silva
Em Dom, 2008-09-14 às 16:07 -0300, Marco Túlio Gontijo e Silva escreveu: Thanks, I got it to work running threadWaitRead stdInput before getChar. Now I've got another problem: import Control.Concurrent import System.IO import System.Process main :: IO () main = do process -

Re: [Haskell-cafe] system in forkIO

2008-09-14 Thread Don Stewart
marcot: Em Dom, 2008-09-14 às 16:07 -0300, Marco Túlio Gontijo e Silva escreveu: Thanks, I got it to work running threadWaitRead stdInput before getChar. Now I've got another problem: import Control.Concurrent import System.IO import System.Process main :: IO () main

Re: [Haskell-cafe] system in forkIO

2008-09-14 Thread Marco Túlio Gontijo e Silva
Em Dom, 2008-09-14 às 14:52 -0700, Don Stewart escreveu: marcot: Em Dom, 2008-09-14 às 16:07 -0300, Marco Túlio Gontijo e Silva escreveu: Thanks, I got it to work running threadWaitRead stdInput before getChar. Now I've got another problem: import Control.Concurrent