Re: Posix library ,Concurrent Haskell and Haskell IO sub-system

2003-07-11 Thread Rafael Martinez Torres
On Thu, 10 Jul 2003, Volker Stolz wrote: In local.glasgow-haskell-users, you wrote: I use the Posix library since I have to communicate via a pipe with another UNIX process. Therefore I have to use fdRead :: Fd - ByteCount - IO (String,ByteCount) Why do you have to use an Fd? A

Re: Posix library ,Concurrent Haskell and Haskell IO sub-system

2003-07-11 Thread Rafael Martinez Torres
On Fri, 11 Jul 2003, Volker Stolz wrote: createPipe :: IO (Fd,Fd) (Unkown alternatives) I suppose you have to pass this descriptor to another process through fork()? Rigth. (piper,pipew) - createPipe mpid - forkProcess case mpid of Nothing - do --child nobytes - fdWrite

Re: Posix library ,Concurrent Haskell and Haskell IO sub-system

2003-07-11 Thread Volker Stolz
On Fri, Jul 11, 2003 at 08:39:54AM +0200, Rafael Martinez Torres wrote: (piper,pipew) - createPipe piperHandle - fdToHandle(piper) threadWaitRead ( fdToInt(handleToFd(piperHandle)) ) message - hGetLine piperHandle --or whatever. There's no need to call threadWaitRead, Haskell's RTS will take

Posix library ,Concurrent Haskell and Haskell IO sub-system

2003-07-10 Thread Rafael Martinez Torres
I use the Posix library since I have to communicate via a pipe with another UNIX process. Therefore I have to use fdRead :: Fd - ByteCount - IO (String,ByteCount) The problem is that fdRead , as a non Haskell-IO sub-system function, seems to block the entire STG system. The rest of the other

Re: Posix library ,Concurrent Haskell and Haskell IO sub-system

2003-07-10 Thread Volker Stolz
In local.glasgow-haskell-users, you wrote: I use the Posix library since I have to communicate via a pipe with another UNIX process. Therefore I have to use fdRead :: Fd - ByteCount - IO (String,ByteCount) Why do you have to use an Fd? A regular handle should be sufficient. Where do you get