Forks::Super version 0.52

Forks::Super provides drop-in replacements for the Perl fork(), wait(), and waitpid() functions with additional features for spawning background processes and managing them, including:

RECOMMENDED PERL VERSION

The Forks::Super module is recommended for versions of Perl later than 5.7.2 that implement "deferred" signals (See the "Deferred Signals (Safe Signals)" section of any recent version of perlipc), as the signal handlers used in the module are insufficiently paranoid. However the module will compile and run with Perl 5.6.

INSTALLATION

The typical installation recipe

perl Makefile.PL
make
make test
make install

usually works. The unit tests assume they are running on a moderately loaded system; intermittent failures are more likely on a heavily loaded system. If "make test" fails, it will often work if you run it a second time.

It will take about 10 minutes to run the test suite of the Forks::Super module with "make test". An alternative is to run

make fasttest

which will run the Forks::Super module tests in parallel, using the Forks::Super module. Running "make fasttest" will take about 1-2 minutes.

DEPENDENCIES

Windows users must install the Win32::API module.

The bg_eval function for evaluating Perl code in a background process requires either the YAML, YAML::Tiny, JSON, or Data::Dumper modules. It is a fatal error to use bg_eval when at least one of these modules can not be found.

Otherwise, Forks::Super recommends and will make use of the following modules if they are installed, but will still be able to perform most of its functions without them:

DateTime::Format::Natural
Proc::ProcessTable
Win32::Process, Win32::API [Windows and Cygwin] Win32 [Windows]
Sys::CpuAffinity
Sys::CpuLoadX

The Sys::CpuAffinity and Sys::CpuLoadX are bundled with the Forks::Super module distribution, and may be installed at the same time. The Sys::CpuAffinity module is also available as a separate module on CPAN. See "BUNDLED MODULES", below.

BUNDLED MODULES

This Forks::Super distribution comes bundled with two additional modules, Sys::CpuAffinity and Sys::CpuLoadX. You will have the opportunity to install these modules at the same time that you install the Forks::Super module.

The Sys::CpuAffinity module is for manipulating process CPU affinities. The Forks::Super module can make use of this module to control the CPU affinities of background processes. This is a released module that can also be retrieved and installed from CPAN.

The Sys::CpuLoadX module is for determining the current CPU load of your system. The Forks::Super module can make use of this module to decide whether the system is too busy to launch additional background tasks. As of Forks::Super version 0.30, this is an unreleased module and it is only available bundled with Forks::Super.

Installation of these additional modules is optional. If the modules are not available, then certain features of the Forks::Super module may not work.

WINDOWS

Some features of this module do not work or work a little differently with Windows systems. See the README.windows file included in this distribution for important information.

LICENSE AND COPYRIGHT

Copyright (c) 2009-2011, Marty O'Brien.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

See http://dev.perl.org/licenses/ for more information.