Diff for /loncom/lond between versions 1.22 and 1.24

version 1.22, 2000/12/05 03:24:48 version 1.24, 2000/12/05 18:02:14
Line 25  use LWP::UserAgent(); Line 25  use LWP::UserAgent();
 use GDBM_File;  use GDBM_File;
 use Authen::Krb4;  use Authen::Krb4;
   
   # grabs exception and records it to log before exiting
   sub catchexception {
       my ($signal)=@_;
       &logthis("<font color=red>CRITICAL: "
        ."ABNORMAL EXIT. Child $$ for server $wasserver died through "
        ."$signal with this parameter->[$@]</font>");
       die($@);
   }
   
   # grabs exception and records it to log before exiting
   # NOTE: we must NOT use the regular (non-overrided) die function in
   # the code because a handler CANNOT be attached to it
   # (despite what some of the documentation says about SIG{__DIE__}.
   sub catchdie {
       my ($message)=@_;
       &logthis("<font color=red>CRITICAL: "
        ."ABNORMAL EXIT. Child $$ for server $wasserver died through "
        ."\_\_DIE\_\_ with this parameter->[$message]</font>");
       die($message);
   }
   
 # -------------------------------- Set signal handlers to record abnormal exits  # -------------------------------- Set signal handlers to record abnormal exits
   
 $SIG{'QUIT'}=\&catchexception;  $SIG{'QUIT'}=\&catchexception;
Line 529  sub make_new_child { Line 550  sub make_new_child {
                              $response=$ua->request($request,$transname);                               $response=$ua->request($request,$transname);
       }        }
                              if ($response->is_error()) {                               if ($response->is_error()) {
  unline($transname);   unlink($transname);
                                  my $message=$response->status_line;                                   my $message=$response->status_line;
                                  &logthis(                                   &logthis(
                                   "LWP GET: $message for $fname ($remoteurl)");                                    "LWP GET: $message for $fname ($remoteurl)");
Line 1014  sub make_new_child { Line 1035  sub make_new_child {
     }      }
 }  }
   
 # grabs exception and records it to log before exiting  
 sub catchexception {  
     my ($signal)=@_;  
     &logthis("<font color=red>CRITICAL: "  
      ."ABNORMAL EXIT. Child $$ for server $wasserver died through "  
      ."$signal with this parameter->[$@]</font>");  
     die($@);  
 }  
   
 # grabs exception and records it to log before exiting  
 # NOTE: we must NOT use the regular (non-overrided) die function in  
 # the code because a handler CANNOT be attached to it  
 # (despite what some of the documentation says about SIG{__DIE__}.  
 sub catchdie {  
     my ($message)=@_;  
     &logthis("<font color=red>CRITICAL: "  
      ."ABNORMAL EXIT. Child $$ for server $wasserver died through "  
      ."\_\_DIE\_\_ with this parameter->[$message]</font>");  
     die($message);  
 }  
   
   
   

Removed from v.1.22  
changed lines
  Added in v.1.24


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