Function

GLibunix_signal_add

Declaration

guint
g_unix_signal_add (
  gint signum,
  GSourceFunc handler,
  gpointer user_data
)

Description

A convenience function for g_unix_signal_source_new(), which attaches to the default GMainContext. You can remove the watch using g_source_remove().

Available since:2.30

Parameters

signum gint
 

Signal number.

handler GSourceFunc
 

Callback.

user_data gpointer
 

Data for handler.

Return value

Returns: guint
 

An ID (greater than 0) for the event source.