ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-MP/bin/aemp
(Generate patch)

Comparing AnyEvent-MP/bin/aemp (file contents):
Revision 1.54 by root, Sat Mar 3 20:35:10 2012 UTC vs.
Revision 1.55 by root, Thu Mar 8 21:37:51 2012 UTC

478When secure mode is enabled, then remote nodes cannot execute code 478When secure mode is enabled, then remote nodes cannot execute code
479locally, at least not via the normal node protocol. All other messages are 479locally, at least not via the normal node protocol. All other messages are
480still allowed. This means remote nodes can monitor, kill or local ports 480still allowed. This means remote nodes can monitor, kill or local ports
481(port names can be easily guessed). 481(port names can be easily guessed).
482 482
483At the moment, this affects C<eval_on> and C<spawn> functionality. 483At the moment, this affects C<snd_on>, C<eval_on> and C<spawn>
484functionality.
484 485
485The C<configure> function additionally allows you to specify a callback 486The C<configure> function additionally allows you to specify a callback
486that can grant or suppress such requests on a per-node basis. 487that can grant or suppress such requests on a per-node basis.
487 488
488=item [set|del]monitor_timeout <seconds> 489=item [set|del]monitor_timeout <seconds>
637 my $to = AE::timer 15, 0, sub { exit 1 }; 638 my $to = AE::timer 15, 0, sub { exit 1 };
638 639
639 init; 640 init;
640 641
641 my $reply = port { 642 my $reply = port {
642 my ($node, @neigh) = @_; 643 my ($node, undef, @neigh) = @_;
643 644
644 @neigh = grep $_ ne $NODE, @neigh; 645 @neigh = grep $_ ne $NODE, @neigh;
645 646
646 print +(join " ", $node, @neigh), "\n"; 647 print $node, " -> ", (join " ", @neigh), "\n";
647 648
648 for (@neigh) { 649 for (@neigh) {
649 unless ($seen{$_}++) { 650 unless ($seen{$_}++) {
650 $cv->begin; 651 $cv->begin;
651 snd $_, up_nodes => $SELF => $_; 652 AnyEvent::MP::Kernel::eval_on $_, "AnyEvent::MP::Kernel::up_nodes" => $SELF => $_;
652 } 653 }
653 } 654 }
654 655
655 $cv->end; 656 $cv->end;
656 }; 657 };
657 658
658 $cv->begin; 659 $cv->begin;
659 snd $reply, seed => $node; 660 snd $reply, $node => undef, AnyEvent::MP::Kernel::up_nodes;
660 661
661 $cv->recv; 662 $cv->recv;
662} 663}
663 664
664sub shell { 665sub shell {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines