pipe through external process?

Manuel M. T. Chakravarty [email protected]
Tue, 17 Jul 2001 22:39:08 +1000


John Meacham <[email protected]> wrote,

> I am trying to implement a function which takes a string, pipes it
> through an external command and returns the stdout of teh command
> utilizing the Posix library and ghc. 
> 
> first of all, if someone has this handy code tidbit already written then
> feel free to send it to me. the other thing is that I cannot figure out
> how to get data into and out of the process. I can create a pipe which
> returns a pair of Fd's but then i cannot pass these into runProcess
> since it expects handles. also I have no ability to wait for the
> termination of the command that runProcess starts... 

I have all this stuff ready to use in a library in my CVS
repository (but it is not very heavily tested yet).  I plan
to release it soon, but just returned from a trip and so may
take a couple of more days.  Is it very urgent for you?

Manuel