Age | Commit message (Collapse) | Author |
|
* 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.
|
|
* sigevent.c: (quagga_signal_handler) add a global caught flag, set
the flags to a constant rather increment to be kinder.
(quagga_sigevent_process) new function, to do core of what
quagga_signal_timer did. dont block signals at all as sig->caught
is volatile sig_atomic_t and should be safe to access from signal
and normal contexts. The signal blocking is unneeded paranoia, but
is left intact under an ifdef, should some platform require it.
Check global caught flag before iterating through array.
(quagga_signal_timer) nearly everything moved to
quagga_sigevent_process. Left in under ifdef, in case some
platform could use a regular timer check for signals.
* sigevent.h: quagga_sigevent_process declaration.
* thread.c: (thread_fetch) check for signals at beginning of
scheduler loop, check for signals if select returns EINTR.
|
|
* sigevent.c: Don't block SIGTRAP and SIGKILL. Blocking SIGTRAP
confuses gdb, at least on NetBSD 2.0_BETA, where the block
succeeds.
|
|
* sigevent.{c,h}: New files, implement event handled signals.
see signal_init() in sigevent.h.
|