Right - the IO manager is only used in the threaded RTS, and it is
started by hs_init(). So by using your own main() you can arrange that
things happen before the IO manager starts.
Cheers,
Simon
On 27/04/2012 17:25, Mark Lentczner wrote:
Follow up - Oh! FFI exporting your function o
Follow up - Oh! FFI exporting your function outputs a stub that does all
that extra stuff... mostly (just misses returning the exit status from the
capability, but that's cool, I don't really need those particular messages
at the end of real_main()... )
Thanks, Gregory!
- Mark
On Fri, Apr 27, 20
Aha - I realize now that my program is linked -threaded, which is why the
IO manager gets started before main: (from rts/RtsStartup.c)
#if defined(THREADED_RTS)
ioManagerStart();
#endif
On Fri, Apr 27, 2012 at 6:57 AM, Gregory Collins wrote:
> Have you thought about calling hs_init() from y
On Fri, Apr 27, 2012 at 3:45 PM, Mark Lentczner 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 spectacula
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
I notice that in a trivial program, say
main = g