OPENFD(9P)

πŸ“¦ version 0_git20260208, in alpine 3.24, arch rolling, nixos 26.05, nixpkgs unstable

πŸ’… OPENFD(9P) β€” openfd, but make it bestie πŸ’…

okay so you opened the OPENFD(9P) page and we're gonna get you comfy with openfd, no cap. ✨

🌸 NAME 🌸

  • openfd β€” prepare a fid for I/O using a file descriptor

πŸ¦‹ SYNOPSIS πŸ¦‹

size[4] Topenfd tag[2] fid[4] mode[1]
size[4] Ropenfd tag[2] qid[13] iounit[4] unixfd[4]

✨ DESCRIPTION ✨

the openfd request behaves like open, except that it prepares and returns a Unix file descriptor corresponding to the opened fid. literally the same vibe, but with a fd handoff. 🫢

after a successful open transaction, fid is considered by the client to have been clunked and can be reused. so yeah, it's done-zo on the client side and free to be reused. πŸ’…

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 mode must be OREAD or OWRITE; it cannot be ORDWR. not me warning you, it's just the rules. 😭

Openfd is implemented by 9pserve(4). 9P servers that post their services using 9pserve(4) (or indirectly via post9pservice(3)) will never see a Topenfd message. iconic, honestly. πŸ‘‘

πŸŽ€ ENTRY POINTS πŸŽ€

  • Fsopenfd (see 9pclient(3)) β€” generates an openfd message. that's the entry point, bestie. ⭐

that's the whole page, bestie πŸ’– the footer is just OPENFD(9P) β€” no source/version/date line to copy, so we're signing off cute instead. byeee πŸŽ€