in reply to Writing a Perl Daemon
I recommend it one more time; get "Network Programming with Perl" ISBN 0201615711. All the code is available, by press and author's permission, for free so you can peruse: Network Programming with Perl. Interruptable, restartable, reinit'able daemons. You won't have any guesses, or slow, system specific memory leaks, or problems afterward. You can probably set up your final daemon to start with your system in /etc/inetd.conf but some of the more system savvy kids here might have better advice.