in reply to Managing the fork/execing and reaping of child processes

while (1) { if ($active_readers < $current_reader_limit) { # Launch enough new readers to bring us up to the current limi +t

Have you considered using Parallel::ForkManager?

DESCRIPTION

This module is intended for use in operations that can be done in parallel where the number of processes to be forked off should be limited.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^2: Managing the fork/execing and reaping of child processes
by Anonymous Monk on Jul 16, 2015 at 20:59 UTC
    By far the best suggestion . . . this is a thing already done.