From 78e51a8c6678b6e3dff3d619aa786669f531f4bc Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 14 Jan 2005 03:45:44 +0000 Subject: checkpoint --- man/man3/sendfd.html | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 man/man3/sendfd.html (limited to 'man/man3/sendfd.html') diff --git a/man/man3/sendfd.html b/man/man3/sendfd.html new file mode 100644 index 00000000..37007603 --- /dev/null +++ b/man/man3/sendfd.html @@ -0,0 +1,85 @@ + +sendfd(3) - Plan 9 from User Space + + + + +
+
+
SENDFD(3)SENDFD(3) +
+
+

NAME
+ +
+ + sendfd, recvfd – pass file descriptors along Unix domain sockets
+ +
+

SYNOPSIS
+ +
+ + #include <u.h> +
+
+ #include <libc.h> +
+
+ int    sendfd(int socket, int fd) +
+
+ int    recvfd(int socket)
+
+
+

DESCRIPTION
+ +
+ + Recvfd and sendfd can be used to pass an open file descriptor + over a Unix domain socket from one process to another. Since pipe(3) + is implemented with socketpair(2) instead of pipe(2), socket can + be a file descriptor obtained from pipe(3). +
+ + Sendfd sends the file descriptor fd along the socket to a process + calling recvfd on the other end. +
+ + It is assumed that the two sides have coordinated and agreed to + transfer a file descriptor already, so that the sendfd is met + with a recvfd instead of an ordinary read. +
+ + The file descriptor number may change on its way between processes, + but the kernel structure it represents will not.
+ +
+

SOURCE
+ +
+ + /usr/local/plan9/src/lib9/sendfd.c
+
+
+

SEE ALSO
+ +
+ + socketpair(2), sendmsg in send(2)
+ +
+ +

+
+
+ + +
+
+
+Space Glenda +
+
+ + -- cgit v1.2.3