Typedefs | |
| typedef void(* | icd_signal_handler_fn )(int sig) |
Functions | |
| static void | icd_signal_handler (int sig) |
| static gboolean | icd_signal_cb (GIOChannel *chan, GIOCondition cond, gpointer data) |
| int | icd_signal_init (icd_signal_handler_fn signal_handler,...) |
Variables | |
| static int | signal_pipe [2] |
| typedef void(* icd_signal_handler_fn)(int sig) |
The signal handler function
| sig | the received signal |
| static gboolean icd_signal_cb | ( | GIOChannel * | chan, | |
| GIOCondition | cond, | |||
| gpointer | data | |||
| ) | [static] |
GLib callback called from main loop when the signal pipe receives data. This function only polls the signal pipe and calls signal_handler to do the actual work.
| chan | IO Channel associated with file descriptor. | |
| cond | Condition which triggered callback. | |
| data | the signal handler function to call |
Referenced by icd_signal_init().
| static void icd_signal_handler | ( | int | sig | ) | [static] |
Signal handler.
| sig | Received signal number. |
References signal_pipe.
Referenced by icd_signal_init().
| int icd_signal_init | ( | icd_signal_handler_fn | signal_handler, | |
| ... | ||||
| ) |
Initialize signal handling. Create pipe for queueing signals from signal handler to main thread. Hook all processed signals and create a Glib io watch for the pipe.
| signal_handler | function handling the signal | |
| ... | signals to watch, end with -1 |
References icd_signal_cb(), icd_signal_handler(), ILOG_ERR, and signal_pipe.
Referenced by main().
int signal_pipe[2] [static] |
pipe used in communication between the posix signal handler and the glib main loop
Referenced by icd_signal_handler(), and icd_signal_init().
1.5.6