summaryrefslogtreecommitdiff
path: root/lib/log.h
diff options
context:
space:
mode:
authorajs <ajs>2004-11-23 18:19:14 +0000
committerajs <ajs>2004-11-23 18:19:14 +0000
commit59a06a915da9129a4e756c2b4d42449aa71a0ee4 (patch)
tree44090f696cbec97cab5e5b090b22c7431a5d6490 /lib/log.h
parentd246bd965898f0ba6781f2b2048af9a5eba079d3 (diff)
2004-11-23 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* sigevent.c: (signal_init) Set up some default signal handlers so that processes will issue an error message before terminating or dumping core. (trap_default_signals) New function to set up signal handlers for various signals that may kill the process. (exit_handler) Call zlog_signal, then _exit. (core_handler) Call zlog_signal, then abort. * log.h: Declare new function zlog_signal. * log.c: (zlog_signal) New function to log information about a received signal before the process dies. Try to log a backtrace also. (quagga_signal_handler,signal_set) Should be static.
Diffstat (limited to 'lib/log.h')
-rw-r--r--lib/log.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/log.h b/lib/log.h
index e0437603..1fd4fe0c 100644
--- a/lib/log.h
+++ b/lib/log.h
@@ -122,4 +122,7 @@ extern const char *zlog_priority[];
/* Safe version of strerror -- never returns NULL. */
extern const char *safe_strerror(int errnum);
+/* To be called when a fatal signal is caught. */
+extern void zlog_signal(int signo, const char *action);
+
#endif /* _ZEBRA_LOG_H */