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

droeschl droeschl at source.lon-capa.org
Thu Jul 4 07:44:44 EDT 2013


droeschl		Thu Jul  4 11:44:44 2013 EDT

  Modified files:              
    /loncom	lonmaxima 
  Log:
  See BUG# 6653 for a detailed description.
  Fixes sporadic occurrences of "code ran too long" whenever maxima was used
  in problems.
  
  
  
Index: loncom/lonmaxima
diff -u loncom/lonmaxima:1.41 loncom/lonmaxima:1.42
--- loncom/lonmaxima:1.41	Thu Feb 16 19:54:06 2012
+++ loncom/lonmaxima	Thu Jul  4 11:44:44 2013
@@ -3,7 +3,7 @@
 # The LearningOnline Network with CAPA
 # Connect to MAXIMA CAS
 #
-# $Id: lonmaxima,v 1.41 2012/02/16 19:54:06 droeschl Exp $
+# $Id: lonmaxima,v 1.42 2013/07/04 11:44:44 droeschl Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -259,7 +259,11 @@
 
         &logthis('New process started');
 
-        my $command=Expect->spawn('maxima');
+        my $command = new Expect();
+        $command->log_stdout(0);
+        #$command->log_file("$execdir/logs/lonmaxima.session.log");
+        $command->spawn('maxima');
+        &getmaximaoutput($command, 2); # wait for maxima to finish initialization
 	# soft/hard_close can take awhile and we really
         # don't care we just want it gone
 	$SIG{INT} = sub {
@@ -268,8 +272,6 @@
 	    exit; 
 	};
 
-	$command->log_stdout(0);
-	#$command->log_file("$execdir/logs/lonmaxima.session.log");
 
         for (my $i=0; $i < $MAX_CLIENTS_PER_CHILD; $i++) {
             &status('Accepting connections');




More information about the LON-CAPA-cvs mailing list