Method _Stdio.Fd()->send_fd()


Method send_fd

void send_fd(Stdio.Fd fd)

Description

Queues an open file descriptor for sending to the other end of a stream.

Note

The actual sending is performed at the next successful call to write(), this is due to limitations in the system calls. This means that it isn't possible to send a file descriptor without also sending some in-band data.

This operation is only supported on pipe()'s created with PROP_SEND_FD.

This function is not available on all operating systems, check for __HAVE_SEND_FD__.

The queue is emptied on successful write() and when the write direction is close()'d.

See also

receive_fd(), write(), pipe(), read(), __HAVE_SEND_FD__