NAME

PSA::Acceptor::Forker - base class for acceptors that fork

SYNOPSIS

(see derived code)

DESCRIPTION

This is a base class, from which the PSA::Acceptor::AutoCGI and PSA::Acceptor::HTTP classes derive.

This code adds to the basic acceptor;

manager

a property that contains a process manager, such as PSA::ProcManager. This is a placeholder for now.

pre_fork

a user-supplied code reference to be called before the acceptor forks (eg, to close a database connection that might not handle the forking well). This is added to via the add_pre_fork() method.

post_fork

a user-supplied code reference to be called in new children (eg, to open a new database connection). This is added to via the add_post_fork() method.

It is up to the manager class to handle the forking, keeping enough children running, killing off and monitoring old children, etc.