perlfork – Perl’s fork emulation
Picked this up on twitter from a conversation between 2 rather well-known hard-core Rubyists (and both certainly former hard-core Perl Mongers):
my mate James Edward Gray II (author of the Textmate book, author of the Ruby CSV library modules, renowned I18N guru, contributor to my FRITZ!Box call monitor, …) and Yehuda Katz (member of Engine Yard, Rails core contributor, …).
SYNOPSIS
Perl provides a fork() keyword that corresponds to the Unix system call of the same name. On most Unix-like platforms where the fork() system call is available, Perl’s fork() simply calls it.
On some platforms such as Windows where the fork() system call is not available, Perl can be built to emulate fork() at the interpreter level. While the emulation is designed to be as compatible as possible with the real fork() at the the level of the Perl program, there are certain important differences that stem from the fact that all the pseudo child “processes” created this way live in the same real process as far as the operating system is concerned.
This document provides a general overview of the capabilities and limitations of the fork() emulation. Note that the issues discussed here are not applicable to platforms where a real fork() is available and Perl has been configured to use it.