[Haskell-cafe] Re: Closest analog to popen()
John Goerzen
jgoerzen at complete.org
Tue Apr 12 22:17:56 EDT 2005
On 2005-04-12, Dimitry Golubovsky <golubovsky at gmail.com> wrote:
> Does there exist any analog of popen in the standard Haskell libraries?
Dmitry,
I have one in MissingH, and it's written in pure Haskell. Reference at
http://quux.org/devel/missingh/html/MissingH.Cmd.html, code at
http://quux.org/devel/missingh.
If you choose to not use that code, and instead write your own, just
know that popen() can be implemented in terms of pipe(), dup(), and
fork() in C -- or createPipe, dupTo, and forkProcess in Haskell. Take
care to handle SIGCHLD properly -- or, just use my module :-)
-- John
More information about the Haskell-Cafe
mailing list