Diff for /loncom/lonr between versions 1.3 and 1.5

version 1.3, 2009/04/17 01:00:10 version 1.5, 2009/04/18 23:43:47
Line 269  sub make_new_child { Line 269  sub make_new_child {
  };   };
   
  $command->log_stdout(0);   $command->log_stdout(0);
  $command->log_file("$execdir/logs/lonr.session.log");  # $command->log_file("$execdir/logs/lonr.session.log");
   
         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 316  sub make_new_child { Line 316  sub make_new_child {
     sub sync {      sub sync {
  my ($command)=@_;   my ($command)=@_;
  $counter++;   $counter++;
  my $expect=$counter.time;   my $expect=$counter;
  print $command "$expect;\n";   print $command "$expect;\n";
  while (1) {   while (1) {
     my $output=&getroutput($command);      my $output=&getroutput($command);
Line 352  sub getroutput { Line 352  sub getroutput {
     foreach my $line (split(/\n/,$output)) {      foreach my $line (split(/\n/,$output)) {
        $line=~s/\s$//gs;         $line=~s/\s$//gs;
        if ($line=~/^Error\:/) { $syntaxerr=1; next; }         if ($line=~/^Error\:/) { $syntaxerr=1; next; }
        if (my ($result)=($line=~/^\[\d+\,*\]\s*(.*)/)) { $realoutput.=$result."\n"; }         if (my ($result)=($line=~/^\[?\d+\,*\]?\s*(.*)/)) { $realoutput.=$result."\n"; }
     }      }
     if (wantarray) {      if (wantarray) {
         return ($realoutput,$syntaxerr);          return ($realoutput,$syntaxerr);

Removed from v.1.3  
changed lines
  Added in v.1.5


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