looking for some help understanding the IO Manager start up

Gregory Collins greg at gregorycollins.net
Fri Apr 27 15:57:27 CEST 2012


On Fri, Apr 27, 2012 at 3:45 PM, Mark Lentczner <mark at glyphic.com> wrote:

> The IO manager opens two pipes, and (at least for kqueue) another file
> descriptor. The program I'm working on (a shell!) needs to control FDs 0-9
> -- so if the IO manager opens these things on those FDs, my program breaks
> in spectacular ways....


Have you thought about calling hs_init() from your own C main() function?
You can set up the file descriptors however you like if you do this. See
§8.2.1.1 here:
http://www.haskell.org/ghc/docs/7.4.1/html/users_guide/ffi-ghc.html .

G
-- 
Gregory Collins <greg at gregorycollins.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/cvs-ghc/attachments/20120427/ad939d74/attachment-0001.htm>


More information about the Cvs-ghc mailing list