GLib.unix_fd_source_new

function unix_fd_source_new(fd: Number(gint), condition: GLib.IOCondition): GLib.Source {
    // Gjs wrapper for g_unix_fd_source_new()
}
  

Creates a GLib.Source to watch for a particular IO condition on a file descriptor.

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

Since 2.36

fd

a file descriptor

condition

IO conditions to watch for on fd

Returns

the newly created GLib.Source