Diff for /loncom/lond between versions 1.146 and 1.147

version 1.146, 2003/09/16 10:28:14 version 1.147, 2003/09/23 11:23:31
Line 60 Line 60
 # 09/08/2003 Ron Fox:  Told lond to take care of change logging so we  # 09/08/2003 Ron Fox:  Told lond to take care of change logging so we
 #      don't have to remember it:  #      don't have to remember it:
 # $Log$  # $Log$
   # Revision 1.147  2003/09/23 11:23:31  foxr
   # Comlplete implementation of reinit functionality.  Must still implement
   # the actual initialization functionality, but the process can now
   # receive the request and either invoke the appropriate internal function or
   # signal the correct lonc.
   #
 # Revision 1.146  2003/09/16 10:28:14  foxr  # Revision 1.146  2003/09/16 10:28:14  foxr
 # ReinitProcess - decode the process selector and produce the associated pid  # ReinitProcess - decode the process selector and produce the associated pid
 # filename.  Note: While it is possible to test that valid process selectors are  # filename.  Note: While it is possible to test that valid process selectors are
Line 388  sub ReinitProcess { Line 394  sub ReinitProcess {
     #      #
     #      #
     my ($junk, $process) = split(":", $request);      my ($junk, $process) = split(":", $request);
     my $processpidfile = $perlvar{'lonDaemons'}.'/';      my $processpidfile = $perlvar{'lonDaemons'}.'/logs/';
     if($process eq 'lonc') {      if($process eq 'lonc') {
  $processpidfile = $processpidfile."lonc.pid";   $processpidfile = $processpidfile."lonc.pid";
    if (!open(PIDFILE, "< $processpidfile")) {
       return "error:Open failed for $processpidfile";
    }
    my $loncpid = <PIDFILE>;
    close(PIDFILE);
    logthis('<font color="red"> Reinitializing lonc pid='.$loncpid
    ."</font>");
    kill("USR2", $loncpid);
     } elsif ($process eq 'lond') {      } elsif ($process eq 'lond') {
  $processpidfile = $processpidfile."lond.pid";   logthis('<font color="red"> Reinitializing self (lond) </font>');
    &UpdateHosts; # Lond is us!!
     } else {      } else {
  &logthis('<font color="yellow" Invalid reinit request for '.$process   &logthis('<font color="yellow" Invalid reinit request for '.$process
  ."</font>");   ."</font>");
  return "error:Invalid process identifier $process";   return "error:Invalid process identifier $process";
     }      }
     &logthis('<font color="red"> Reinitializing '.$process." </font>");  
     return 'ok';      return 'ok';
 }  }
   
Line 548  sub HUPSMAN {                      # sig Line 562  sub HUPSMAN {                      # sig
 #     now be honored.  #     now be honored.
 #  #
 sub UpdateHosts {  sub UpdateHosts {
       logthis('<font color="blue"> Updating connections </font>');
 }  }
   
 sub checkchildren {  sub checkchildren {

Removed from v.1.146  
changed lines
  Added in v.1.147


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