> What is the convention for handling daemonization in a POE application?
>
> In particular, what I am wondering is whether typically one daemonizes
> before $poe_kernel->run() or do the daemonization in one of the
> "application manager" sessions.
>
> For example, I am considering using what I call a "StoreKeeper" session
> to handle application initialization with AppConfig, start up other
> helper sessions, etc.  Following that paradigm, some where in the
> "_start" event handler of "StoreKeeper", it probably should also
> daemonize (using Net::Server::Daemonize).

I'm using the Daemon module that Lincoln Stein develops in his book "Network
Programming with Perl".  I could have used Net::Server::Daemonize but I was
reading the book at the time... :-)

My "binary" (main script) reads config, daemonizes, then creates my
Bootstrap session, then $poe_kernel->run().

The hardest part was capturing all of the output to a log.  There are
certain errors that cause POE to quit silently without a visible error
message if it's detached from the terminal. <sigh>  But 2 chapters later,
Lincoln introduced logging... :-)

L8r,
Rob

Reply via email to