in reply to dbi and fork

There's some nice code for a forking server that monitors the children and cleans up after itself in The Perl Cookbook.