blob: 56fb392a28477a139351bdcaab8b7aebf329acdd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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
.IM 9pserve (4) .
9P servers that post their services using
.IM 9pserve (4)
(or indirectly via
.IM post9pservice (3) )
will never see a
.B Topenfd
message.
.SH ENTRY POINTS
.I Fsopenfd
(see
.IM 9pclient (3) )
generates an
.B openfd
message.
|