signal_add


Description:

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 DEFAULT and 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