]> andersk Git - moira.git/blobdiff - lib/critical.c
added ingres error & deadlock detection
[moira.git] / lib / critical.c
index 51680ba6a9b46ef4335cbef3f0ff4569ee3689f0..dbfde11817343f6ba85c0a7a359f9ce042580ad6 100644 (file)
@@ -14,6 +14,8 @@
 /* mode to create the file with */
 #define LOGFILEMODE    0644
 
+extern char *whoami;
+
 
 void critical_alert(instance, msg, args)
   char *instance;              /* Instance for zephyr gram */
@@ -21,7 +23,8 @@ void critical_alert(instance, msg, args)
                                /* args = arguements, printf style */
   /* This routine sends a class SMS zephyrgram of specified instance
      and logs to a special logfile the message passed to it via msg
-     and args in printf format. */
+     and args in printf format.  *** It expects the global variable
+     whoami to be defined and contain the name of the calling program. */
   /* Note: The part of this code that process the variable arguements
      was stolen from sprintf(). */
 {
@@ -52,6 +55,8 @@ void critical_alert(instance, msg, args)
        fprintf(crit, "%s <%d> %s\n", time_s, getpid(), buf);
        fclose(crit);
     }
+
+    com_err(whoami, 0, buf);
 }
 
 
This page took 0.032758 seconds and 4 git commands to generate.