POSIX::AtFork - Hook registrations at fork(2)
# POSIX interface: use POSIX::AtFork qw(pthread_atfork); pthread_atfork(\&prepare, \&parent, \&child); # or per-hook interfaces: POSIX::AtFork->add_to_prepare(\&prepare); POSIX::AtFork->add_to_parent(\&parent); POSIX::AtFork->add_to_child(\&child); # registered callbacks can be removed POSIX::AtFork->delete_from_prepare(\&prepare); POSIX::AtFork->delete_from_parent( \&parent); POSIX::AtFork->delete_from_child( \&child);
This module is an interface to pthread_atfork(3) which registeres handlers called before and after fork(2).
pthread_atfork(3)
fork(2)
See SYNOPSIS.
pthread_atfork(3).
Fuji, Goro (gfx)
Copyright (C) 2010 by Fuji, Goro gfx <gfuji@cpan.org>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself,
To install POSIX::AtFork, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POSIX::AtFork
CPAN shell
perl -MCPAN -e shell install POSIX::AtFork
For more information on module installation, please visit the detailed CPAN module installation guide.