unixFdSourceNew

fnglib.source.Source unixFdSourceNew(int fd, glib.types.IOCondition condition)

Creates a #GSource to watch for a particular I/O condition on a file descriptor.

The source will never close the fd — you must do it yourself.

Any callback attached to the returned #GSource must have type #GUnixFDSourceFunc.

Parameters

fda file descriptor
conditionI/O conditions to watch for on fd

Returns

the newly created #GSource