how to open a file descriptor

David Roundy droundy@abridgegame.org
Sat, 1 Feb 2003 19:20:56 -0500


Hello.  I'm in the process of interfacing with some C code (libcurl), and I
thought that the easiest way to transfer the data in (which is a file
transfered over the network) would be to open a pipe and write it into the
pipe, and then to pass the pipe over to haskell where I could read it with
the IO monad normally.

Is there any nice way to open up a file descriptor? I was looking at the
ghc internal code, which has an openFd function that would do what I want,
but it doesn't seem to be exported.  :(  Any ideas?
-- 
David Roundy
http://civet.berkeley.edu/droundy/