[LON-CAPA-cvs] cvs: modules /gerd/maxima lonmaxima

www lon-capa-cvs@mail.lon-capa.org
Wed, 10 May 2006 02:12:20 -0000


www		Tue May  9 22:12:20 2006 EDT

  Modified files:              
    /modules/gerd/maxima	lonmaxima 
  Log:
  Don't make the client wait for the synching, do it as cleanup instead.
  
  
Index: modules/gerd/maxima/lonmaxima
diff -u modules/gerd/maxima/lonmaxima:1.18 modules/gerd/maxima/lonmaxima:1.19
--- modules/gerd/maxima/lonmaxima:1.18	Tue May  9 21:08:01 2006
+++ modules/gerd/maxima/lonmaxima	Tue May  9 22:12:17 2006
@@ -3,7 +3,7 @@
 # The LearningOnline Network with CAPA
 # Connect to MAXIMA CAS
 #
-# $Id: lonmaxima,v 1.18 2006/05/10 01:08:01 www Exp $
+# $Id: lonmaxima,v 1.19 2006/05/10 02:12:17 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -255,10 +255,9 @@
            &status('Accepting connections');
            my $client = $server->accept()     or last;
            print $command "kill(all);reset();\n";
-           &getmaximaoutput($command);
+           &sync($command);
            while (my $cmd=<$client>) {
               &status('Processing command');
-	      &sync($command);
               print $command &unescape($cmd);
               my $reply=&getmaximaoutput($command);
               print $client &escape($reply)."\n";
@@ -267,7 +266,8 @@
                  $client->close();
                  $command->hard_close();     
                  exit;
-              }
+              }	      
+	      &sync($command);
               &status('Waiting for commands');
            }
         }