Rocco Caputo wrote:
On Sat, Aug 23, 2003 at 01:05:15PM -0500, Jake wrote:

Hi,

I want to create a POE server that doesn't block my terminal when I start
it.  I did it with a fork but I haven't seen anyone do it this way so I
figure I'm missing something in POE to do it.

How am I supposed to build a server that when I start it, I get my prompt
back?


[...]

It's rather easy to daemonize a program, and it's covered in an existing
CPAN module (Net::Server::Daemonize), so it hasn't been included in POE
itself.


a very simple formula is:


fork and exit unless DEBUG; # provided of course you have a DEBUG constant

very early in your program. that way, in debug mode, the program will stay attached and spew its debug content. otherwise, it will daemonize.

--
Matt Cashner
http://eekeek.org



Reply via email to