Diff for /loncom/loncron between versions 1.73 and 1.74

version 1.73, 2007/04/13 18:26:22 version 1.74, 2007/05/31 05:20:18
Line 81  sub start_daemon { Line 81  sub start_daemon {
     }      }
     my $error_fname="$perlvar{'lonDaemons'}/logs/${daemon}_errors";      my $error_fname="$perlvar{'lonDaemons'}/logs/${daemon}_errors";
     &rotate_logfile($error_fname,$fh,'error logs');      &rotate_logfile($error_fname,$fh,'error logs');
       if ($daemon eq 'lonc') {
    &clean_sockets($fh);
       }
     system("$perlvar{'lonDaemons'}/$progname 2>$perlvar{'lonDaemons'}/logs/${daemon}_errors");      system("$perlvar{'lonDaemons'}/$progname 2>$perlvar{'lonDaemons'}/logs/${daemon}_errors");
     sleep 1;      sleep 1;
     if (-e $pidfile) {      if (-e $pidfile) {
Line 399  sub clean_lonIDs { Line 401  sub clean_lonIDs {
     &log($fh,"<h3>$active open session(s)</h3>");      &log($fh,"<h3>$active open session(s)</h3>");
 }  }
   
   # ----------------------------------------------------------- clean out sockets
   sub clean_sockets {
       my ($fh)=@_;
       my $cleaned=0;
       opendir(SOCKETS,$perlvar{'lonSockDir'});
       while (my $fname=readdir(SOCKETS)) {
    next if (-d $fname 
    || $fname=~/(mysqlsock|maximasock|\Q$perlvar{'lonSockDir'}\E)/);
    $cleaned++;
    &log($fh,"Unlinking $fname<br />");
    unlink("/home/httpd/sockets/$fname");
       }
       &log($fh,"<p>Cleaned up ".$cleaned." stale sockets.</p>");
   }
   
   
 # ----------------------------------------------------------------------- httpd  # ----------------------------------------------------------------------- httpd
 sub check_httpd_logs {  sub check_httpd_logs {

Removed from v.1.73  
changed lines
  Added in v.1.74


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