Diff for /loncom/loncron between versions 1.7 and 1.9

version 1.7, 2000/12/06 21:11:35 version 1.9, 2000/12/08 23:33:36
Line 312  if (-e $londfile) { Line 312  if (-e $londfile) {
       print $fh "<h3>lond at pid $londpid responding</h3>";        print $fh "<h3>lond at pid $londpid responding</h3>";
       $restartflag=0;        $restartflag=0;
    } else {     } else {
       $errors++; $errors++;        $errors++;
       print $fh "<h3>lond at pid $londpid not responding</h3>";        print $fh "<h3>lond at pid $londpid not responding</h3>";
       # Intelligently handle this.        # Intelligently handle this.
       # Possibility #1: there is no process        # Possibility #1: there is no process
Line 321  if (-e $londfile) { Line 321  if (-e $londfile) {
   unlink($londfile);    unlink($londfile);
   $restartflag=1;    $restartflag=1;
       }        }
         else {
       # Possibility #2: there is a zombie process        # Possibility #2: there is a zombie process
       # Possibility #3: there is a live process that is not responding        # Possibility #3: there is a live process that is not responding
       #                 for an unknown reason        #                 for an unknown reason
       # Solution: kill process, remove .pid and restart        # Solution: kill process, remove .pid and restart
       kill 2 => $londpid;    `killall -9 lond`;
       unlink($londfile);    unlink($londfile);
       $restartflag=1;    $restartflag=1;
       print $fh "<h3>Deciding to clean up stale .pid file and restart lond</h3>";        }
         print $fh 
     "<h3>Deciding to clean up stale .pid file and restart lond</h3>";
    }     }
 }   } 
 if ($restartflag==1) {  if ($restartflag==1) {
Line 411  if (-e $loncfile) { Line 414  if (-e $loncfile) {
       kill USR1 => $loncpid;        kill USR1 => $loncpid;
       $restartflag=0;        $restartflag=0;
    } else {     } else {
       $errors++; $errors++;        $errors++;
       print $fh "<h3>lonc at pid $loncpid not responding</h3>";        print $fh "<h3>lonc at pid $loncpid not responding</h3>";
       # Intelligently handle this.        # Intelligently handle this.
       # Possibility #1: there is no process        # Possibility #1: there is no process
Line 420  if (-e $loncfile) { Line 423  if (-e $loncfile) {
   unlink($loncfile);    unlink($loncfile);
   $restartflag=1;    $restartflag=1;
       }        }
         else {
       # Possibility #2: there is a zombie process        # Possibility #2: there is a zombie process
       # Possibility #3: there is a live process that is not responding        # Possibility #3: there is a live process that is not responding
       #                 for an unknown reason        #                 for an unknown reason
       # Solution: kill process, remove .pid and restart        # Solution: kill process, remove .pid and restart
       kill 2 => $loncpid;    `killall -9 lonc`;
       unlink($loncfile);    unlink($loncfile);
       $restartflag=1;    $restartflag=1;
       print $fh "<h3>Deciding to clean up stale .pid file and restart lonc</h3>";        }
         print $fh 
     "<h3>Deciding to clean up stale .pid file and restart lonc</h3>";
    }     }
 }   } 
 if ($restartflag==1) {  if ($restartflag==1) {

Removed from v.1.7  
changed lines
  Added in v.1.9


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