Go to the source code of this file.
Typedefs | |
typedef struct pa_signal_event | pa_signal_event |
An opaque UNIX signal event source object. | |
typedef void(* | pa_signal_cb_t )(pa_mainloop_api *api, pa_signal_event *e, int sig, void *userdata) |
Callback prototype for signal events. | |
typedef void(* | pa_signal_destroy_cb_t )(pa_mainloop_api *api, pa_signal_event *e, void *userdata) |
Destroy callback prototype for signal events. | |
Functions | |
int | pa_signal_init (pa_mainloop_api *api) |
Initialize the UNIX signal subsystem and bind it to the specified main loop. | |
void | pa_signal_done (void) |
Cleanup the signal subsystem. | |
pa_signal_event * | pa_signal_new (int sig, pa_signal_cb_t callback, void *userdata) |
Create a new UNIX signal event source object. | |
void | pa_signal_free (pa_signal_event *e) |
Free a UNIX signal event source object. | |
void | pa_signal_set_destroy (pa_signal_event *e, pa_signal_destroy_cb_t callback) |
Set a function that is called when the signal event source is destroyed. |
In contrast to other main loop event sources such as timer and IO events, UNIX signal support requires modification of the global process environment. Due to this the generic main loop abstraction layer as defined in mainloop-api.h doesn't have direct support for UNIX signals. However, you may hook signal support into an abstract main loop via the routines defined herein.
typedef void(* pa_signal_cb_t)(pa_mainloop_api *api, pa_signal_event *e, int sig, void *userdata) |
Callback prototype for signal events.
typedef void(* pa_signal_destroy_cb_t)(pa_mainloop_api *api, pa_signal_event *e, void *userdata) |
Destroy callback prototype for signal events.
typedef struct pa_signal_event pa_signal_event |
void pa_signal_free | ( | pa_signal_event * | e | ) |
Free a UNIX signal event source object.
int pa_signal_init | ( | pa_mainloop_api * | api | ) |
pa_signal_event* pa_signal_new | ( | int | sig, | |
pa_signal_cb_t | callback, | |||
void * | userdata | |||
) |
void pa_signal_set_destroy | ( | pa_signal_event * | e, | |
pa_signal_destroy_cb_t | callback | |||
) |
Set a function that is called when the signal event source is destroyed.
Use this to free the userdata argument if required