diff options
author | etienne | 2004-06-11 08:10:13 +0000 |
---|---|---|
committer | etienne | 2004-06-11 08:10:13 +0000 |
commit | deca073780bbf0da87b06f6927d4d23fe5f8a07d (patch) | |
tree | 006db1ce3b4333a611fa5e596f325ce41a76a316 | |
parent | 8cfc00b622680f6c7b653959be49fbd35e3af71b (diff) | |
download | ivylaunch-deca073780bbf0da87b06f6927d4d23fe5f8a07d.zip ivylaunch-deca073780bbf0da87b06f6927d4d23fe5f8a07d.tar.gz ivylaunch-deca073780bbf0da87b06f6927d4d23fe5f8a07d.tar.bz2 ivylaunch-deca073780bbf0da87b06f6927d4d23fe5f8a07d.tar.xz |
Sur réception d'un message DIE, ivylaunch le retransmet aux agents qu'il a
lancé. La méthode qui consiste à leu envoyer un message de terminaison n'est
conservé que lorsque ivylaunch recoit un signal SIGINT ou SIGKILL.
-rwxr-xr-x | ivylaunch | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -39,7 +39,6 @@ # signal handlers -#END { Quit (); } $SIG{INT} = $SIG{KILL} = 'Quit'; @@ -172,24 +171,29 @@ sub Child { ###################################################### sub Terminate { - # when this function is called on an ivy die message, - # children don't terminate. must be explored... - foreach (keys %child) { - print "$HEADER Stopping $child{$_} (pid=$_)...\n"; - kill 15, $_; + print "$HEADER Die message received\n"; + foreach (values %child) { + print "$HEADER sendDieTo $_ ...\n"; + $ivy->sendDieTo($_); } foreach my $app (@{$cmd{'end'}}) { FugueConfig::launchCommand('end',@$app); } - print "\n$HEADER Terminated\n"; + print "$HEADER Terminated\n"; } ###################################################### sub Quit { - print "Quit\n"; - &Terminate(); + print "$HEADER Quit\n"; + foreach (keys %child) { + print "$HEADER Stopping $child{$_} (pid=$_)...\n"; + kill 15, $_; + } + foreach my $app (@{$cmd{'end'}}) { + FugueConfig::launchCommand('end',@$app); + } $ivy->stop(); exit; } @@ -231,7 +235,7 @@ ivylaunch [-help] [-b bus] [-override] fugueconfigfile =head1 DESCRIPTION -ivylaunch forks ivy agents described in a Fugue configuration file. ivylaunch is also an ivy agent : it reports agents connection and disconnection, and can be killed by an Ivy die message. It can be also killed by sending an interrupt signal from keyboard (SIGINT) or kill signal (SIGKILL). In both cases, ivylaunch sends a termination signals to its forked children before exiting. +ivylaunch forks ivy agents described in a Fugue configuration file. ivylaunch is also an ivy agent : it reports agents connection and disconnection, and can be killed by an Ivy die message which is transmitted to its forked agents. It can be also killed by sending an interrupt signal (SIGINT) or kill signal (SIGKILL); in this case, ivylaunch sends a termination signal to its forked children before exiting. =back @@ -297,10 +301,6 @@ local lasra twinkle:ACC:WP:TC twinkle POSITION --role TC -norender local astik IvyMon ivymon -=head1 BUG - -When ivylaunch terminates on an ivy die message, its children keep alive. - =head1 SEE ALSO ivycontrolpanel(1), ivybanner(1), cpp(1) |