Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
io_passfd(3)		   Library Functions Manual		  io_passfd(3)

NAME
       io_passfd - pass	a file descriptor over a Unix Domain socket

SYNTAX
       #include	<io.h>

       int io_passfd(int64 sock,int64 fd);

DESCRIPTION
       io_passfd  transfers the	file descriptor	fd over	the Unix Domain	socket
       sock.  This works much like dup(2), only	that the copy of the  descrip-
       tor appears not in this process but at the other	end of the Unix	Domain
       socket (which therefore must be a process on the	same system).

       The peer	can then use io_receivefd(3) to	receive	the file descriptor.

       Note that the passed descriptor stays open in the sending process.

RETURN VALUE
       io_passfd returns 0 on success, -1  on  error  (setting	errno  accord-
       ingly).

SEE ALSO
       io_receivefd(3)

								  io_passfd(3)

NAME | SYNTAX | DESCRIPTION | RETURN VALUE | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=libowfat_io_passfd&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help