On 09-Nov-2001 Eric Cholet wrote: > I've started playing with samples/preforkedserver. Since I want > mine to run as a daemon I added 'fork && exit;' just before the > call to PreforkedServer->new.
Detaching a daemon involves more then fork and exit. Perl Cookbook recomends closing STDOUT and reopening it to a log file. Then dup STDOUT to STDERR. Then setsid(), fork() and exit in the parent. The PCB examples will have the exact code. -Philip
