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

bisitz lon-capa-cvs-allow@mail.lon-capa.org
Thu, 14 Feb 2008 14:09:43 -0000


bisitz		Thu Feb 14 09:09:43 2008 EDT

  Modified files:              
    /loncom	lonmaxima 
  Log:
  Bugfix:
  The sync-call before the for loop is premature. For at this time the connection to the server has not been accepted. Hence, the sync-call catches a timeout-error message. Unfortunately this takes 20s. So the client will be set up with a delay of 20s. Calls to maxima in this timeslot might lead (and do in practice) to "code ran too long" errors in the calling problem.
  
  Moving the said sync-call after the $server-accept command remedies this issue.
  
  
  
Index: loncom/lonmaxima
diff -u loncom/lonmaxima:1.36 loncom/lonmaxima:1.37
--- loncom/lonmaxima:1.36	Fri Nov  9 13:54:46 2007
+++ loncom/lonmaxima	Thu Feb 14 09:09:43 2008
@@ -3,7 +3,7 @@
 # The LearningOnline Network with CAPA
 # Connect to MAXIMA CAS
 #
-# $Id: lonmaxima,v 1.36 2007/11/09 18:54:46 albertel Exp $
+# $Id: lonmaxima,v 1.37 2008/02/14 14:09:43 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -270,11 +270,11 @@
 
 	$command->log_stdout(0);
 	#$command->log_file("$execdir/logs/lonmaxima.session.log");
-        &sync($command);
 
         for (my $i=0; $i < $MAX_CLIENTS_PER_CHILD; $i++) {
             &status('Accepting connections');
             my $client = $server->accept()     or last;
+            &sync($command);
             print $command ("display2d:false;kill(all);\n");
 	    &getmaximaoutput($command,2);
             &sync($command);