Top |
void | (*XfcePosixSignalHandler) () |
gboolean | xfce_posix_signal_handler_init () |
void | xfce_posix_signal_handler_restore_handler () |
gboolean | xfce_posix_signal_handler_set_handler () |
void | xfce_posix_signal_handler_shutdown () |
Due to reentrancy issues, there is a restricted set of functions/syscalls that are allowed to be performed inside a POSIX signal handler. In general, it's safer to defer any signal-related processing until after the signal handler has run. The functionality in this module automatically handles this, and allows you to set a handler function (with optional user data) for any signal.
gboolean
xfce_posix_signal_handler_init (GError **error
);
Initializes the POSIX signal handler system. Must be called before setting any POSIX signal handlers.
void
xfce_posix_signal_handler_restore_handler
(gint signal
);
Restores the default handler for signal
.
gboolean xfce_posix_signal_handler_set_handler (gint signal
,XfcePosixSignalHandler handler
,gpointer user_data
,GError **error
);
Sets handler
to be called whenever signal
is caught by the
application. The user_data
parameter will be passed as an argument
to handler
.