summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xivylaunch28
1 files changed, 14 insertions, 14 deletions
diff --git a/ivylaunch b/ivylaunch
index e726012..9b03434 100755
--- a/ivylaunch
+++ b/ivylaunch
@@ -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)