Blob
1 .TH OPENFD 9P2 .SH NAME3 openfd \- prepare a fid for I/O using a file descriptor4 .SH SYNOPSIS5 .ta \w'\fLTopenfd 'u6 .IR size [4]7 .B Topenfd8 .IR tag [2]9 .IR fid [4]10 .IR mode [1]11 .br12 .IR size [4]13 .B Ropenfd14 .IR tag [2]15 .IR qid [13]16 .IR iounit [4]17 .IR unixfd [4]18 .SH DESCRIPTION19 The20 .I openfd21 request behaves like open, except that it prepares and returns22 a Unix file descriptor corresponding to the opened fid.23 .PP24 After a successful25 .I open26 transaction,27 .I fid28 is considered by the client to have been clunked29 and can be reused.30 .PP31 The returned Unix file descriptor is one end of a Unix pipe.32 A proxy process at the other end transfers data between33 the pipe and the 9P server.34 Because it is a pipe, errors on reads and writes are discarded35 and36 .I mode37 must be38 .B OREAD39 or40 .BR OWRITE ;41 it cannot be42 .BR ORDWR .43 .PP44 .I Openfd45 is implemented by46 .IR 9pserve (4).47 9P servers that post their services using48 .IR 9pserve (4)49 (or indirectly via50 .IR post9pservice (3))51 will never see a52 .B Topenfd53 message.54 .SH ENTRY POINTS55 .I Fsopenfd56 (see57 .IR 9pclient (3))58 generates an59 .B openfd60 message.