On Sep 1, 2005, at 15:56, Hicks, Matthew wrote:
I'm writing a program that can run interactively, or as a daemon. It
spawns a few sessions with POE::Wheel::Run that work fine
interactively.
If I call Proc::Daemon::Init, the wheels generate a single error
signal--operation: read, errnum: 0, errstr: <blank>--then a .
Read error 0 is EOF.
Is this a side-effect in Wheel::Run due to Proc::Daemon closing the
initial process' filehandles? If so, what is the 'proper' way to
daemonize a POE program in order to support Wheel::Run?
I daemonize before calling kernel->run(). STDERR is re-opened to a
logfile in order to capture trace output, but I can't find anything
that
looks like a meaningful error message.
_start handlers may be executed before POE::Kernel->run(). If the
wheels are created there, Proc::Daemon may be interfering with them.
Can you daemonize the program before starting any sessions?
Any pointers how to continue debugging/solving this issue?
Determine what Proc::Daemon::Init is doing.
How would that force child processes to close their sockets, or
simulate the behavior from the parent process' point of view?
--
Rocco Caputo - rcaputo@xxxxxxxxx
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|