
13 Apr
2005
13 Apr
'05
2:17 a.m.
On 2005-04-12, Dimitry Golubovsky
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