Diff for /loncom/lonmaxima between versions 1.30 and 1.34

version 1.30, 2007/06/12 23:48:45 version 1.34, 2007/11/09 18:47:01
Line 256  sub make_new_child { Line 256  sub make_new_child {
   
  $command->log_stdout(0);   $command->log_stdout(0);
  #$command->log_file("$execdir/logs/lonmaxima.session.log");   #$command->log_file("$execdir/logs/lonmaxima.session.log");
         &getmaximaoutput($command);          &sync($command);
   
         for (my $i=0; $i < $MAX_CLIENTS_PER_CHILD; $i++) {          for (my $i=0; $i < $MAX_CLIENTS_PER_CHILD; $i++) {
             &status('Accepting connections');              &status('Accepting connections');
Line 283  sub make_new_child { Line 283  sub make_new_child {
             }              }
         }          }
   
    print $command ("quit();\n");
         # tidy up gracefully and finish          # tidy up gracefully and finish
   
         $command->soft_close();          $command->soft_close();
Line 341  sub getmaximaoutput { Line 342  sub getmaximaoutput {
     }      }
     $output =~ s/\r+//g; # Remove Windows-style linebreaks      $output =~ s/\r+//g; # Remove Windows-style linebreaks
     my $foundoutput=0;      my $foundoutput=0;
       my $found_label=0;
     my $realoutput='';      my $realoutput='';
     foreach my $line (split(/\n/,$output)) {      foreach my $line (split(/\n/,$output)) {
        if ($line=~/\;/) { $foundoutput=1; next; }         if ($line=~/\;/) { $foundoutput=1; next; }
        if (!$foundoutput) { next; }         if (!$foundoutput) { next; }
        if ($line=~/^Incorrect syntax:/) { $syntaxerr = 1; next; }         if ($line=~/^Incorrect syntax:/) { $syntaxerr = 1; next; }
        (my $label, $line) = ($line=~ /^(\(\%o\d+\))(.+)$/);         if ($line=~ /^(\(\%o\d+\))(.+)$/){
        if ($label) {             my $label = $1;
            $label=~s/\S/ /g;             $line = $2;
              $label =~s/\S/ /g;
            $line=$label.$line;             $line=$label.$line;
      $found_label=1;
          }
          if ($found_label) {
      $realoutput.=$line."\n";
        }         }
        $realoutput.=$line."\n";  
     }      }
     if (wantarray) {      if (wantarray) {
         return ($realoutput,$syntaxerr);          return ($realoutput,$syntaxerr);

Removed from v.1.30  
changed lines
  Added in v.1.34


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>