I am trying to write a utility that contains a server which spins up in
a cgi script.  I am using a thread (ithreads), do a check to see if it
is running, and the start the server.  I have the thread creation in a
module.  I am running in Win32, using an apache server, all relatively
latest and greatest of evreything.

So, my server dies after some time of successful operation.  Is this
due to Apache limiting how long a process can run?  I am considering a
fork/exec (daemon-style), but would prefer not, as this poses other
problems.  If I do use fork, is the only way to communicate to it
through IPCs (message queue, socket, etc?)?

Also, I don't know how to handle static data in perl.  I have a
function in my module that looks up data out of a file.  How can I look
it up once, and keep it in memory thereafter?  Make it shared, and part
of my ever-running thread, or is there another way?  Every time I enter
into my module for a function call, this data gets read from a file.

Thanks in advance,

-Kevin

Reply via email to