unixSignalAdd

fnuint unixSignalAdd(int priority, int signum, glib.types.SourceFunc handler)

A convenience function for [glib.global.unixSignalSourceNew], which attaches to the default #GMainContext. You can remove the watch using [glib.source.Source.remove].

Parameters

prioritythe priority of the signal source. Typically this will be in the range between [glib.types.PRIORITY_DEFAULT] and [glib.types.PRIORITY_HIGH].
signumSignal number
handlerCallback

Returns

An ID (greater than 0) for the event source