mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-06 17:14:02 +00:00
glib-aux: add nm_g_unix_signal_add_source() helper
This commit is contained in:
parent
7ae2f842ae
commit
09daf5dd92
|
@ -1788,6 +1788,14 @@ nm_g_unix_fd_add_source(int fd,
|
|||
NULL);
|
||||
}
|
||||
|
||||
static inline GSource *
|
||||
nm_g_unix_signal_add_source(int signum, GSourceFunc handler, gpointer user_data)
|
||||
{
|
||||
return nm_g_source_attach(
|
||||
nm_g_unix_signal_source_new(signum, G_PRIORITY_DEFAULT, handler, user_data, NULL),
|
||||
NULL);
|
||||
}
|
||||
|
||||
NM_AUTO_DEFINE_FCN0(GMainContext *, _nm_auto_unref_gmaincontext, g_main_context_unref);
|
||||
#define nm_auto_unref_gmaincontext nm_auto(_nm_auto_unref_gmaincontext)
|
||||
|
||||
|
|
Loading…
Reference in a new issue