… | |
… | |
255 | =head1 CONCEPTS |
255 | =head1 CONCEPTS |
256 | |
256 | |
257 | This module can create new processes either by executing a new perl |
257 | This module can create new processes either by executing a new perl |
258 | process, or by forking from an existing "template" process. |
258 | process, or by forking from an existing "template" process. |
259 | |
259 | |
|
|
260 | All these processes are called "child processes" (whether they are direct |
|
|
261 | children or not), while the process that manages them is called the |
|
|
262 | "parent process". |
|
|
263 | |
260 | Each such process comes with its own file handle that can be used to |
264 | Each such process comes with its own file handle that can be used to |
261 | communicate with it (it's actually a socket - one end in the new process, |
265 | communicate with it (it's actually a socket - one end in the new process, |
262 | one end in the main process), and among the things you can do in it are |
266 | one end in the main process), and among the things you can do in it are |
263 | load modules, fork new processes, send file handles to it, and execute |
267 | load modules, fork new processes, send file handles to it, and execute |
264 | functions. |
268 | functions. |
… | |
… | |
373 | use AnyEvent; |
377 | use AnyEvent; |
374 | use AnyEvent::Util (); |
378 | use AnyEvent::Util (); |
375 | |
379 | |
376 | use IO::FDPass; |
380 | use IO::FDPass; |
377 | |
381 | |
378 | our $VERSION = 0.6; |
382 | our $VERSION = 0.7; |
379 | |
383 | |
380 | # the early fork template process |
384 | # the early fork template process |
381 | our $EARLY; |
385 | our $EARLY; |
382 | |
386 | |
383 | # the empty template process |
387 | # the empty template process |
… | |
… | |
906 | Cygwin perl is not supported at the moment due to some hilarious |
910 | Cygwin perl is not supported at the moment due to some hilarious |
907 | shortcomings of its API - see L<IO::FDPoll> for more details. |
911 | shortcomings of its API - see L<IO::FDPoll> for more details. |
908 | |
912 | |
909 | =head1 SEE ALSO |
913 | =head1 SEE ALSO |
910 | |
914 | |
911 | L<AnyEvent::Fork::Early> (to avoid executing a perl interpreter), |
915 | L<AnyEvent::Fork::Early>, to avoid executing a perl interpreter at all |
|
|
916 | (part of this distribution). |
|
|
917 | |
912 | L<AnyEvent::Fork::Template> (to create a process by forking the main |
918 | L<AnyEvent::Fork::Template>, to create a process by forking the main |
913 | program at a convenient time), L<AnyEvent::Fork::RPC> (for simple RPC to |
919 | program at a convenient time (part of this distribution). |
914 | child processes). |
920 | |
|
|
921 | L<AnyEvent::Fork::RPC>, for simple RPC to child processes (on CPAN). |
915 | |
922 | |
916 | =head1 AUTHOR AND CONTACT INFORMATION |
923 | =head1 AUTHOR AND CONTACT INFORMATION |
917 | |
924 | |
918 | Marc Lehmann <schmorp@schmorp.de> |
925 | Marc Lehmann <schmorp@schmorp.de> |
919 | http://software.schmorp.de/pkg/AnyEvent-Fork |
926 | http://software.schmorp.de/pkg/AnyEvent-Fork |