net-snmp 5.7
|
Registering and unregistering signal handlers. More...
Functions | |
RETSIGTYPE | agent_SIGCHLD_handler (int sig) |
int | register_signal (int sig, void(*func)(int)) |
Registers a POSIX Signal handler. | |
int | unregister_signal (int sig) |
Unregisters a POSIX Signal handler. | |
Variables | |
int | external_signal_scheduled [NUM_EXTERNAL_SIGS] |
void(* | external_signal_handler [NUM_EXTERNAL_SIGS])(int) |
Registering and unregistering signal handlers.
int register_signal | ( | int | sig, |
void(*)(int) | func | ||
) |
Registers a POSIX Signal handler.
Implements the signal registering process for POSIX and non-POSIX systems. Also, unifies the way signals work. Note that the signal handler should register itself again with signal() call before end of execution to prevent possible problems.
sig | POSIX Signal ID number, as defined in signal.h. |
func | New signal handler function. |
Definition at line 2353 of file agent_registry.c.
int unregister_signal | ( | int | sig | ) |
Unregisters a POSIX Signal handler.
sig | POSIX Signal ID number, as defined in signal.h. |
Definition at line 2392 of file agent_registry.c.