--- loncom/lond 2000/12/05 03:24:48 1.22
+++ loncom/lond 2000/12/05 16:51:41 1.23
@@ -25,6 +25,27 @@ use LWP::UserAgent();
use GDBM_File;
use Authen::Krb4;
+# grabs exception and records it to log before exiting
+sub catchexception {
+ my ($signal)=@_;
+ &logthis("CRITICAL: "
+ ."ABNORMAL EXIT. Child $$ for server $wasserver died through "
+ ."$signal with this parameter->[$@]");
+ 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("CRITICAL: "
+ ."ABNORMAL EXIT. Child $$ for server $wasserver died through "
+ ."\_\_DIE\_\_ with this parameter->[$message]");
+ die($message);
+}
+
# -------------------------------- Set signal handlers to record abnormal exits
$SIG{'QUIT'}=\&catchexception;
@@ -1014,26 +1035,6 @@ sub make_new_child {
}
}
-# grabs exception and records it to log before exiting
-sub catchexception {
- my ($signal)=@_;
- &logthis("CRITICAL: "
- ."ABNORMAL EXIT. Child $$ for server $wasserver died through "
- ."$signal with this parameter->[$@]");
- 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("CRITICAL: "
- ."ABNORMAL EXIT. Child $$ for server $wasserver died through "
- ."\_\_DIE\_\_ with this parameter->[$message]");
- die($message);
-}