Proc::Fork::Control - management front end to fork()

Proc::Fork::Control caps how many children a process may run, tracks
those children, and can either block until they exit or return as soon
as they have been started. The interface is a set of exported functions.

INSTALL

    perl Makefile.PL
    make
    make test
    make install

A nonblocking pool:

    use Proc::Fork::Control;

    cfork_init(25);
    cfork_nonblocking(1);

    for my $item (@work) {
        cfork(sub {
            # child work
            cfork_exit(0);
        });
    }

    cfork_nonblocking(0);
    cfork_wait();

In the default blocking mode, cfork() waits for the child before it
returns. Turn nonblocking mode on when more than one child must run at
the same time.

REQUIREMENTS

Perl 5.8 or newer, POSIX, and Time::HiRes.

TESTS

    prove -l t

COPYRIGHT

Copyright (C) 2014-2026 Colin Faber

The module source is released under the GNU General Public License,
version 2 (LICENSE.GPL). This distribution also includes the Artistic
License 1.0 (LICENSE), as it has since the first public release.

SUPPORT

https://github.com/cfaber/Proc-Fork-Control/issues
