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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Fri, 09 Nov 2007 18:54:46 -0000


albertel		Fri Nov  9 13:54:46 2007 EDT

  Modified files:              
    /loncom	lonmaxima 
  Log:
  - cap how many extra children there can be in case of oddities
  
  
Index: loncom/lonmaxima
diff -u loncom/lonmaxima:1.35 loncom/lonmaxima:1.36
--- loncom/lonmaxima:1.35	Fri Nov  9 13:51:10 2007
+++ loncom/lonmaxima	Fri Nov  9 13:54:46 2007
@@ -3,7 +3,7 @@
 # The LearningOnline Network with CAPA
 # Connect to MAXIMA CAS
 #
-# $Id: lonmaxima,v 1.35 2007/11/09 18:51:10 albertel Exp $
+# $Id: lonmaxima,v 1.36 2007/11/09 18:54:46 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -134,7 +134,9 @@
 
 sub child_announce_death {
     $SIG{USR1} = \&child_announce_death;
-    $extra_children++;
+    if ($extra_children < $PREFORK*10) {
+	$extra_children++;
+    }
 }
 
 # ---------------------------------------------------------------- Main program
@@ -299,7 +301,7 @@
 	kill('USR1' => $ppid);
 	print $command ("quit();\n");
         # tidy up gracefully and finish
-
+	sleep(15);
         $command->soft_close();
 
         # this exit is VERY important, otherwise the child will become