Diff for /loncom/lond between versions 1.65 and 1.67

version 1.65, 2002/02/05 17:17:49 version 1.67, 2002/02/06 13:34:21
Line 163  $children               = 0;        # cu Line 163  $children               = 0;        # cu
 sub REAPER {                        # takes care of dead children  sub REAPER {                        # takes care of dead children
     $SIG{CHLD} = \&REAPER;      $SIG{CHLD} = \&REAPER;
     my $pid = wait;      my $pid = wait;
     $children --;      if (defined($children{$pid})) {
     &logthis("Child $pid died");   &logthis("Child $pid died");
     delete $children{$pid};   $children --;
    delete $children{$pid};
       } else {
    &logthis("Unknown Child $pid died");
       }
 }  }
   
 sub HUNTSMAN {                      # signal handler for SIGINT  sub HUNTSMAN {                      # signal handler for SIGINT
Line 204  sub checkchildren { Line 208  sub checkchildren {
     foreach (sort keys %children) {      foreach (sort keys %children) {
         unless (-e "$docdir/lon-status/londchld/$_.txt") {          unless (-e "$docdir/lon-status/londchld/$_.txt") {
     &logthis('Child '.$_.' did not respond');      &logthis('Child '.$_.' did not respond');
             kill 9 => $_;      kill 9 => $_;
       $emailto="$perlvar{'lonAdmEMail'},$perlvar{'lonSysEMail'}";
       $subj="LON: $perlvar{'lonHostID'} killed lond process $_";
       my $result=`echo 'Killed lond process $_.' | mailto $emailto -s '$subj' > /dev/null`
       $execdir=$perlvar{'lonDaemons'};
       $result=`/bin/cp $execdir/logs/lond.log $execdir/logs/lond.log.$_`
         }          }
     }      }
 }  }

Removed from v.1.65  
changed lines
  Added in v.1.67


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