[LON-CAPA-cvs] cvs: loncom / loncnew
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Tue, 01 May 2007 01:04:24 -0000
albertel Mon Apr 30 21:04:24 2007 EDT
Modified files:
/loncom loncnew
Log:
- when handling the reload need to clear out the children preccesses after they have exited
Index: loncom/loncnew
diff -u loncom/loncnew:1.84 loncom/loncnew:1.85
--- loncom/loncnew:1.84 Wed Apr 11 12:20:26 2007
+++ loncom/loncnew Mon Apr 30 21:04:23 2007
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# lonc maintains the connections to remote computers
#
-# $Id: loncnew,v 1.84 2007/04/11 16:20:26 albertel Exp $
+# $Id: loncnew,v 1.85 2007/05/01 01:04:23 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2149,13 +2149,19 @@
sub KillThemAll {
Debug(2, "Kill them all!!");
- local($SIG{CHLD}) = 'IGNORE'; # Our children >will< die.
- foreach my $pid (keys %ChildPid) {
+
+ #local($SIG{CHLD}) = 'IGNORE';
+ # Our children >will< die.
+ # but we need to catch their death and cleanup after them in case this is
+ # a restart set of kills
+ my @allpids = keys(%ChildPid);
+ foreach my $pid (@allpids) {
my $serving = $ChildPid{$pid};
ShowStatus("Nicely Killing lonc for $serving pid = $pid");
Log("CRITICAL", "Nicely Killing lonc for $serving pid = $pid");
kill 'QUIT' => $pid;
}
+ ShowStatus("Finished killing child processes off.");
}