… | |
… | |
465 | use AnyEvent; |
465 | use AnyEvent; |
466 | use AnyEvent::Util (); |
466 | use AnyEvent::Util (); |
467 | |
467 | |
468 | use IO::FDPass; |
468 | use IO::FDPass; |
469 | |
469 | |
470 | our $VERSION = 1.2; |
470 | our $VERSION = 1.3; |
471 | |
471 | |
472 | # the early fork template process |
472 | # the early fork template process |
473 | our $EARLY; |
473 | our $EARLY; |
474 | |
474 | |
475 | # the empty template process |
475 | # the empty template process |
… | |
… | |
556 | |
556 | |
557 | if ($pid eq 0) { |
557 | if ($pid eq 0) { |
558 | require AnyEvent::Fork::Serve; |
558 | require AnyEvent::Fork::Serve; |
559 | $AnyEvent::Fork::Serve::OWNER = $parent; |
559 | $AnyEvent::Fork::Serve::OWNER = $parent; |
560 | close $fh; |
560 | close $fh; |
561 | $0 = "$_[1] of $parent"; |
561 | $0 = "$AnyEvent::Fork::Serve::OWNER AnyEvent::Fork/exec"; |
562 | AnyEvent::Fork::Serve::serve ($slave); |
562 | AnyEvent::Fork::Serve::serve ($slave); |
563 | exit 0; |
563 | exit 0; |
564 | } elsif (!$pid) { |
564 | } elsif (!$pid) { |
565 | die "AnyEvent::Fork::Early/Template: unable to fork template process: $!"; |
565 | die "AnyEvent::Fork::Early/Template: unable to fork template process: $!"; |
566 | } |
566 | } |