signal_add


Description:

[ Version ( since = "2.30" ) ]
[ CCode ( cname = "g_unix_signal_add_full" ) ]
public uint signal_add (int signum, owned SourceFunc handler, int priority = DEFAULT)

A convenience function for SignalSource, which attaches to the default MainContext.

You can remove the watch using remove.

Parameters:

signum

Signal number

handler

Callback

priority

the priority of the signal source. Typically this will be in the range between g_priority_default and g_priority_high.

notify

DestroyNotify for handler

user_data

Data for handler

Returns:

An ID (greater than 0) for the event source


Namespace: GLib.Unix
Package: glib-2.0