summaryrefslogtreecommitdiff
path: root/lib/sigevent.c
AgeCommit message (Collapse)Author
2005-05-062005-05-06 Paul Jakma <paul@dishone.st>paul
* (general) extern and static'ification of functions in code and header. Cleanup any definitions with unspecified arguments. Add casts for callback assignments where the callback is defined, typically, as passing void *, but the function being assigned has some other pointer type defined as its argument, as gcc complains about casts from void * to X* via function arguments. Fix some old K&R style function argument definitions. Add noreturn gcc attribute to some functions, as appropriate. Add unused gcc attribute to some functions (eg ones meant to help while debugging) Add guard defines to headers which were missing them. * command.c: (install_node) add const qualifier, still doesnt shut up the warning though, because of the double pointer. (cmp_node) ditto * keychain.c: (key_str2time) Add GET_LONG_RANGE() macro, derived fromn vty.h ones to fix some of the (long) < 0 warnings. * thread.c: (various) use thread_empty (cpu_record_hash_key) should cast to uintptr_t, a stdint.h type * vty.h: Add VTY_GET_IPV4_ADDRESS and VTY_GET_IPV4_PREFIX so they removed from ospfd/ospf_vty.h * zebra.h: Move definition of ZEBRA_PORT to here, to remove dependence of lib on zebra/zserv.h
2005-04-082005-04-08 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* sigevent.c: On GNU_LINUX, check whether __USE_GNU is already defined.
2005-01-182005-01-18 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* log.h: Test for SA_SIGINFO to see whether zlog_signal takes final two args (siginfo and program_counter). * log.c: (hex_append) Include this function only if SA_SIGINFO or HAVE_GLIBC_BACKTRACE is defined. (zlog_signal) Final two args (siginfo and program_counter) now depend on whether SA_SIGINFO is defined on this platform. * sigevent.c: (program_counter) Do not include this function if SA_SIGINFO is not defined on this platform. (exit_handler,core_handler) Test for SA_SIGINFO to decide whether 2nd & 3rd arguments are present and to decide how to invoke zlog_signal. (trap_default_signals) Test for SA_SIGINFO and invoke sigaction appropriately.
2005-01-122005-01-12 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* configure.ac: Test for header file <ucontext.h> (for use in signal processing). * sigevent.c: (trap_default_signals) Use the SA_SIGINFO flag to pass additional siginfo_t and ucontext_t arguments to core_handler and exit_handler. (core_handler,exit_handler) Now invoked with 3 arguments (using SA_SIGINFO). Pass additional info to zlog_signal. (program_counter) New function to find program counter in ucontext_t, needs to be enhanced to support more platforms (currently works only on Linux/x86). * log.h: Change the zlog_signal prototype to add new arguments siginfo_t * and program_counter. * log.c: (zlog_signal) Add new arguments siginfo and program_counter. Include si_addr and program counter (if non-NULL) in message. And remove #ifdef HAVE_GLIBC_BACKTRACE around hex_append, since that is now used to render the si_addr and PC pointers.
2004-12-152004-12-15 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* sigevent.c: (trap_default_signals) Ignore SIGPIPE instead of exiting.
2004-11-232004-11-23 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* 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.
2004-07-222004-07-14 Paul Jakma <paul@dishone.st>paul
* 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.
2004-07-132004-07-13 Greg Troxel <gdt@poblano.ir.bbn.com>gdt
* sigevent.c: Don't block SIGTRAP and SIGKILL. Blocking SIGTRAP confuses gdb, at least on NetBSD 2.0_BETA, where the block succeeds.
2004-01-192004-01-19 Paul Jakma <paul@dishone.st>paul
* sigevent.{c,h}: New files, implement event handled signals. see signal_init() in sigevent.h.