[LON-CAPA-cvs] cvs: loncom / loncnew

foxr lon-capa-cvs@mail.lon-capa.org
Tue, 16 Sep 2003 09:46:42 -0000


foxr		Tue Sep 16 05:46:42 2003 EDT

  Modified files:              
    /loncom	loncnew 
  Log:
  Added skeletal infrastructure to support SIGUSR2 update hosts request.
  
  
Index: loncom/loncnew
diff -u loncom/loncnew:1.23 loncom/loncnew:1.24
--- loncom/loncnew:1.23	Mon Sep 15 05:24:49 2003
+++ loncom/loncnew	Tue Sep 16 05:46:42 2003
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # lonc maintains the connections to remote computers
 #
-# $Id: loncnew,v 1.23 2003/09/15 09:24:49 foxr Exp $
+# $Id: loncnew,v 1.24 2003/09/16 09:46:42 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -45,6 +45,9 @@
 
 # Change log:
 #    $Log: loncnew,v $
+#    Revision 1.24  2003/09/16 09:46:42  foxr
+#    Added skeletal infrastructure to support SIGUSR2 update hosts request.
+#
 #    Revision 1.23  2003/09/15 09:24:49  foxr
 #    Add use strict and fix all the fallout from that.
 #
@@ -1596,6 +1599,7 @@
 $SIG{TERM} = \&Terminate; 
 $SIG{HUP}  = \&Restart;
 $SIG{USR1} = \&CheckKids; 
+$SIG{USR2} = \&UpdateKids;	# LonManage update request.
 
 while(1) {
     my $deadchild = wait();
@@ -1636,6 +1640,36 @@
 	sleep 1;		# Wait so file doesn't intermix.
     }
 }
+
+=pod
+
+=head1  UpdateKids
+
+parent's SIGUSR1 handler.  This handler:
+
+=item
+
+Rereads the hosts file.
+
+=item
+ 
+Kills off (via sigint) children for hosts that have disappeared.
+
+=item
+
+HUP's children for hosts that already exist (this just forces a status display
+and resets the connection retry count for that host.
+
+=item
+
+Starts new children for hosts that have been added to the hosts.tab file since
+the start of the master program and maintains them.
+
+=cut
+
+sub UpdateKids {
+}
+
 
 =pod