Go to the source code of this file.
Functions | |
int | daemon_signal_init (int s,...) |
Installs signal handlers for the specified signals. More... | |
int | daemon_signal_install (int s) |
Install a signal handler for the specified signal. More... | |
void | daemon_signal_done (void) |
Free resources of signal handling, should be called before daemon exit. More... | |
int | daemon_signal_next (void) |
Return the next signal recieved. More... | |
int | daemon_signal_fd (void) |
Return the file descriptor the daemon should select() on for reading. More... |
You should register all signals you wish to handle with select() in your main loop with daemon_signal_init() or daemon_signal_install(). After that you should sleep on the file descriptor returned by daemon_signal_fd() and get the next signal recieved with daemon_signal_next(). You should call daemon_signal_done() before exiting.
Definition in file dsignal.h.
|
Free resources of signal handling, should be called before daemon exit.
|
|
Return the file descriptor the daemon should select() on for reading. Whenever the descriptor is ready you should call daemon_signal_next() to get the next signal queued.
|
|
Installs signal handlers for the specified signals.
|
|
Install a signal handler for the specified signal.
|
|
Return the next signal recieved. This function will not block. Instead it returns 0 if no signal is queued.
|