ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-Fork/Fork.pm
(Generate patch)

Comparing AnyEvent-Fork/Fork.pm (file contents):
Revision 1.32 by root, Sat Apr 6 09:30:26 2013 UTC vs.
Revision 1.33 by root, Sat Apr 6 09:34:11 2013 UTC

559} 559}
560 560
561=item $pid = $proc->pid 561=item $pid = $proc->pid
562 562
563Returns the process id of the process I<iff it is a direct child of the 563Returns the process id of the process I<iff it is a direct child of the
564process> running AnyEvent::Fork, and C<undef> otherwise. 564process running AnyEvent::Fork>, and C<undef> otherwise.
565 565
566Normally, only processes created via C<< AnyEvent::Fork->new_exec >> and 566Normally, only processes created via C<< AnyEvent::Fork->new_exec >> and
567L<AnyEvent::Fork::Template> are direct children, and you are responsible 567L<AnyEvent::Fork::Template> are direct children, and you are responsible
568to clean up their zombies when they die. 568to clean up their zombies when they die.
569 569
587 587
588The code will usually be executed after this call returns, and there is no 588The code will usually be executed after this call returns, and there is no
589way to pass anything back to the calling process. Any evaluation errors 589way to pass anything back to the calling process. Any evaluation errors
590will be reported to stderr and cause the process to exit. 590will be reported to stderr and cause the process to exit.
591 591
592If you want to execute some code to take over the process (see the 592If you want to execute some code (that isn't in a module) to take over the
593"fork+exec" example in the SYNOPSIS), you should compile a function via 593process, you should compile a function via C<eval> first, and then call
594C<eval> first, and then call it via C<run>. This also gives you access to 594it via C<run>. This also gives you access to any arguments passed via the
595any arguments passed via the C<send_xxx> methods, such as file handles. 595C<send_xxx> methods, such as file handles. See the L<use AnyEvent::Fork as
596a faster fork+exec> example.
596 597
597Returns the process object for easy chaining of method calls. 598Returns the process object for easy chaining of method calls.
598 599
599=cut 600=cut
600 601

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines