Gio.UnixFDList.prototype.steal_fds

function steal_fds(): [return_value: Array(Number(gint)), length: Number(gint)] {
    // Gjs wrapper for g_unix_fd_list_steal_fds()
}
  

Returns the array of file descriptors that is contained in this object.

After this call, the descriptors are no longer contained in list. Further calls will return an empty list (unless more descriptors have been added).

The return result of this function must be freed with GLib.free. The caller is also responsible for closing all of the file descriptors. The file descriptors in the array are set to close-on-exec.

If length is non-null then it is set to the number of file descriptors in the returned array. The returned array is also terminated with -1.

This function never returns null. In case there are no file descriptors contained in list, an empty array is returned.

Since 2.24

return_value

an array of file descriptors

length

pointer to the length of the returned array, or null