Gio.UnixFDMessage.prototype.append_fd

function append_fd(fd: Number(gint)): Boolean {
    // Gjs wrapper for g_unix_fd_message_append_fd()
}
  

Adds a file descriptor to message.

The file descriptor is duplicated using dup(). You keep your copy of the descriptor and the copy contained in message will be closed when message is finalized.

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

Since 2.22

fd

a valid open file descriptor

Returns

true in case of success, else false (and @error is set)