g_unix_fd_list_new_from_array (
  const gint* fds,
  gint n_fds


Creates a new GUnixFDList containing the file descriptors given in fds. The file descriptors become the property of the new list and may no longer be used by the caller. The array itself is owned by the caller.

Each file descriptor in the array should be set to close-on-exec.

If n_fds is -1 then fds must be terminated with -1.

Available since:2.24


fds An array of gint

The initial list of file descriptors.

 The length of the array is specified in the n_fds argument.
 The data is owned by the caller of the function.
n_fds gint

The length of #fds, or -1

Return value

Returns: GUnixFDList

A new GUnixFDList.

 The caller of the function takes ownership of the data, and is responsible for freeing it.