Method

GioUnixFDListappend_take

unstable since: 2.90

Declaration [src]

size_t
g_unix_fd_list_append_take (
  GUnixFDList* list,
  int fd
)

Description [src]

Adds a file descriptor to list.

After this call, fd belongs to the list and may no longer be closed by the caller.

The file descriptor fd should be set to close-on-exec.

The index of the file descriptor in the list is returned. If you use this index with g_unix_fd_list_get() then you will receive back a duplicated copy of the same file descriptor.

Available since: 2.90

Parameters

fd

Type: int

A valid open file descriptor.

Return value

Type: size_t

The index of the appended fd.