in reply to Pre-Forking Daemon with Parallel::ForkManager

my $pm = Parallel::ForkManager->new(NUM_CHILDREN); for (1..NUM_CHILDREN) { $pm->start and next; my $client_sock = $server_sock->accept or die $!; ... $pm->finish; }

Note: It'll use a new process for each request, but the process will be created as soon as the previous request is complete (even if no requests are pending).