UnixFDList.get

Gets a file descriptor out of list.

index_ specifies the index of the file descriptor to get. It is a programmer error for index_ to be out of range; see gio.unix_fdlist.UnixFDList.getLength.

The file descriptor is duplicated using dup() and set as close-on-exec before being returned. You must call close() on it when you are done.

A possible cause of failure is exceeding the per-process or system-wide file descriptor limit.

class UnixFDList
int
get
(
int index
)

Parameters

index int

the index into the list

Return Value

Type: int

the file descriptor, or -1 in case of error