@@ -28,8 +28,14 @@ transaction,
28
28
is considered by the client to have been clunked
29
29
and can be reused.
30
30
.PP
31
- The returned Unix file descriptor is one end of a Unix domain socket.
32
- A proxy process at the other end transfers data between
31
+ In addition to sending a
32
+ .B Ropenfd
33
+ response, the server also sends an out-of-band control-message
34
+ containing a Unix file descriptor (an
35
+ .BR SCM_RIGHTS
36
+ message; this requires that the 9P transport be a Unix domain socket).
37
+ This returned Unix file descriptor is one end of a Unix domain socket;
38
+ a proxy process at the other end transfers data between
33
39
the socket and the 9P server.
34
40
Because it is a socket, errors on reads and writes are discarded.
35
41
.PP
@@ -50,3 +56,18 @@ message.
50
56
generates an
51
57
.B openfd
52
58
message.
59
+ .SH BUGS
60
+ The returned
61
+ .I unixfd
62
+ field nominally refers to the file descriptor that has been sent in
63
+ the control-message. However, the file descriptor in the client
64
+ process will not necessarily have the same number as in the server
65
+ process, so clients should ignore this field and instead trust the
66
+ file descriptor number from the control-message.
67
+ .PP
68
+ .MR 9pclient (3)
69
+ accomplishes this by having
70
+ .B \* 9 /src/lib9pclient/fs.c
71
+ .IR _fsrecv
72
+ rewrite the field to the value from the control-message before
73
+ returning the R-message.
0 commit comments