aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-14 19:37:38 +0000
committerrsc <devnull@localhost>2005-01-14 19:37:38 +0000
commit2eda9ef87a823d095758a1b90ebba47b86c18177 (patch)
treebb92826792063faefaa1fa1f8070aa608a1ca381
parent48edcfdd7c74a6216c715dd675b977a5ba2614e2 (diff)
downloadplan9port-2eda9ef87a823d095758a1b90ebba47b86c18177.tar.gz
plan9port-2eda9ef87a823d095758a1b90ebba47b86c18177.tar.bz2
plan9port-2eda9ef87a823d095758a1b90ebba47b86c18177.zip
documet openfd
-rw-r--r--man/man9/openfd.9p60
1 files changed, 60 insertions, 0 deletions
diff --git a/man/man9/openfd.9p b/man/man9/openfd.9p
new file mode 100644
index 00000000..89aa254f
--- /dev/null
+++ b/man/man9/openfd.9p
@@ -0,0 +1,60 @@
+.TH OPENFD 9P
+.SH NAME
+openfd \- prepare a fid for I/O using a file descriptor
+.SH SYNOPSIS
+.ta \w'\fLTopenfd 'u
+.IR size [4]
+.B Topenfd
+.IR tag [2]
+.IR fid [4]
+.IR mode [1]
+.br
+.IR size [4]
+.B Ropenfd
+.IR tag [2]
+.IR qid [13]
+.IR iounit [4]
+.IR unixfd [4]
+.SH DESCRIPTION
+The
+.I openfd
+request behaves like open, except that it prepares and returns
+a Unix file descriptor corresponding to the opened fid.
+.PP
+After a successful
+.I open
+transaction,
+.I fid
+is considered by the client to have been clunked
+and can be reused.
+.PP
+The returned Unix file descriptor is one end of a Unix pipe.
+A proxy process at the other end transfers data between
+the pipe and the 9P server.
+Because it is a pipe, errors on reads and writes are discarded
+and
+.I mode
+must be
+.B OREAD
+or
+.BR OWRITE ;
+it cannot be
+.BR ORDWR .
+.PP
+.I Openfd
+is implemented by
+.IR 9pserve (4).
+9P servers that post their services using
+.IR 9pserve (4)
+(or indirectly via
+.IR post9pservice (3))
+will never see a
+.B Topenfd
+message.
+.SH ENTRY POINTS
+.I Fsopenfd
+(see
+.IR 9pclient (3))
+generates an
+.B openfd
+message.