Help for this page

Select Code to Download


  1. or download this
    --- ForkBlock.pm~    Wed Dec 24 20:18:01 2008
    +++ ForkBlock.pm    Wed Dec 24 21:02:50 2008
    ...
         
         local $!;
    
  2. or download this
    --- ForkBlock.pm~    Wed Dec 24 21:02:50 2008
    +++ ForkBlock.pm    Wed Dec 24 21:14:35 2008
    ...
           }
             elsif(defined($CHILD_PID)) {
                 #i'm the child
    
  3. or download this
    Fork {
        Parent \&manager,
        Child  \&worker
    };
    
  4. or download this
    --- ForkBlock.pm~    Wed Dec 24 21:14:35 2008
    +++ ForkBlock.pm    Thu Dec 25 02:08:18 2008
    ...
     
         croak "No Child defined" unless $child;
         croak "No Parent defined" unless $parent;
    
  5. or download this
    Fork {
        Parent=>sub{ ... }, #The comma's important here.
        Child =>sub{ ... }
    };