I've got a simple command line (Haskell) program that performs simple, but
meaningful translations in my webapp.  Feeding it input and reading its
output is simple enough:

        set pipe [open "|$cmd" "r+"]

        puts $pipe $input
        flush $pipe

        return [gets $pipe]

Looking at the very helpful doc on mutex pools
(http://panoptic.com/wiki/aolserver/829), I've set up a pool of a few
such pipes at server startup, and plan to keep a handful of these pipes
to external processes laying around, waiting for requests.

However, if I start these processes at server start time, the file
handles are closed before I start handling requests.  I've logged in
through the nscp port and manually initialized a batch of file handles,
and the code does work, but only local to that thread.

So, is there some way to share filehandles across threads?

Thanks,

-- Adam


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to