diff options
author | ajs <ajs> | 2004-11-23 18:19:14 +0000 |
---|---|---|
committer | ajs <ajs> | 2004-11-23 18:19:14 +0000 |
commit | 2127293eee2c2f1e4c0f21e6b3b3c9a5496fec3e (patch) | |
tree | cda77ec5834185747d72598ca7c789693aae0c4b /lib/log.h | |
parent | 01fe17a897c3e7d23aac4e1c8bc5bbfd1ed264b7 (diff) | |
download | quagga-2127293eee2c2f1e4c0f21e6b3b3c9a5496fec3e.tar.bz2 quagga-2127293eee2c2f1e4c0f21e6b3b3c9a5496fec3e.tar.xz |
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.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 */ |