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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Mon, 08 Oct 2007 21:05:51 -0000


albertel		Mon Oct  8 17:05:51 2007 EDT

  Modified files:              
    /loncom	lond 
  Log:
  - removing accidental commit
  
  
Index: loncom/lond
diff -u loncom/lond:1.385 loncom/lond:1.386
--- loncom/lond:1.385	Mon Oct  8 13:40:56 2007
+++ loncom/lond	Mon Oct  8 17:05:49 2007
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.385 2007/10/08 17:40:56 albertel Exp $
+# $Id: lond,v 1.386 2007/10/08 21:05:49 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -59,7 +59,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.385 $'; #' stupid emacs
+my $VERSION='$Revision: 1.386 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -74,8 +74,6 @@
 
 my $cipher;			# Cipher key negotiated with client
 my $tmpsnum = 0;		# Id of tmpputs.
-my $max_children = 1;           # warn when exceeding this
-my $max_children_enforcing = 0;
 
 # 
 #   Connection type is:
@@ -5181,12 +5179,6 @@
 
 my %children               = ();       # keys are current child process IDs
 
-sub flip_max_children_enforcing {
-    $max_children_enforcing = !$max_children_enforcing;
-    &logthis("Flipped child maximum enforcement to (".
-	     $max_children_enforcing.")");
-}
-
 sub REAPER {                        # takes care of dead children
     $SIG{CHLD} = \&REAPER;
     &status("Handling child death");
@@ -5496,7 +5488,6 @@
 $SIG{HUP}  = \&HUPSMAN;
 $SIG{USR1} = \&checkchildren;
 $SIG{USR2} = \&UpdateHosts;
-$SIG{SEGV} = \&flip_max_children_enforcing;
 
 #  Read the host hashes:
 &Apache::lonnet::load_hosts_tab();
@@ -5512,17 +5503,7 @@
     &status('Starting accept');
     $client = $server->accept() or next;
     &status('Accepted '.$client.' off to spawn');
-    my $child_count = scalar(keys(%children));
-    if ($child_count > $max_children) {
-	&logthis("Warning too many children (".$child_count.")");
-    }
-#    if ($child_count > $max_children && $max_children_enforcing) {
-#	&logthis(" Not creating new child ");
-#	$client->close();
-#    } else {
-	&make_new_child($client);
-#    }
-    &logthis("Concurrent children at ($child_count)");
+    make_new_child($client);
     &status('Finished spawning');
 }
 
@@ -5725,18 +5706,10 @@
 # ------------------------------------------------------------ Process requests
 	    my $keep_going = 1;
 	    my $user_input;
-	    my $max_size = (split("\n",`ps -o vsz $$`))[-1];
 	    while(($user_input = get_request) && $keep_going) {
 		alarm(120);
 		Debug("Main: Got $user_input\n");
 		$keep_going = &process_request($user_input);
-		if (!$max_children_enforcing) {
-		    my $new_size = (split("\n",`ps -o vsz $$`))[-1];
-		    if ($new_size > $max_size) {
-			&logthis("size increase of ".($new_size-$max_size)." ($new_size) while processing (".length($user_input).")\n".substr($user_input,0,80));
-			$max_size = $new_size;
-		    }
-		}
 		alarm(0);
 		&status('Listening to '.$clientname." ($keymode)");	   
 	    }
@@ -6417,7 +6390,7 @@
 	eq &Apache::lonnet::get_host_ip($hostid)) {
 	$currenthostid  =$hostid;
 	$currentdomainid=&Apache::lonnet::host_domain($hostid);
-	#&logthis("Setting hostid to $hostid, and domain to $currentdomainid");
+	&logthis("Setting hostid to $hostid, and domain to $currentdomainid");
     } else {
 	&logthis("Requested host id $hostid not an alias of ".
 		 $perlvar{'lonHostID'}." refusing connection");