NAME

POSIX::AtFork - Hook registrations at fork(2)

SYNOPSIS

# 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);

DESCRIPTION

This module is an interface to pthread_atfork(3) which registeres handlers called before and after fork(2).

INTERFACE

See SYNOPSIS.

SEE ALSO

pthread_atfork(3).

AUTHOR

Fuji, Goro (gfx)

COPYRIGHT AND LICENSE

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,