9PSERVE(4)

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

Hi bestie! This is the 9PSERVE(4) page from the Kernel Interfaces Manual β€” section 4, Unix kernel interfaces β€” and we’re about to make 9P multiplexing make sense. πŸ¦‹βœ¨

πŸ’– NAME πŸ’–

9pserve β€” announce and multiplex 9P service

✨ SYNOPSIS ✨

9pserve [ -lnv ] [ -A aname afid ] [ -c addr ] [ -M msize ] addr

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so picture this: on Plan 9, when a user-level file server mounts itself into a name space or posts itself in /srv, the Plan 9 kernel is the one doing the multiplexing β€” it takes the potentially many processes accessing the server and folds them into a single 9P conversation. The user-level server doesn’t have to worry about how many processes are hitting it, or about cleaning up after a process when that process exits unexpectedly. Iconic behavior, honestly. πŸ‘‘

On Unix, 9pserve steps in and takes the place of the Plan 9 kernel: it multiplexes clients onto a single server conversation and cleans up after clients when they hang up unexpectedly. No cap, that’s the whole vibe. πŸ’…

9pserve announces a 9P service on addr and multiplexes any 9P clients connecting to addr into a single conversation with a 9P server on 9pserve’s standard input and output. When a client hangs up, 9pserve flushes any outstanding 9P transactions and clunks any outstanding fids belonging to the client. Cleanup queen fr fr. 🧹✨

Real talk, bestie: 9pserve is typically not invoked directly β€” use post9pservice(3) instead. 🫢

πŸŽ€ The options are: πŸŽ€

  • -l β€” logging; write a debugging log to addr.log.
  • -n β€” no authentication; respond to Tauth messages with an error (see attach(9P)).
  • -v β€” verbose; more verbose when repeated.
  • -A β€” rewrite all attach messages to use aname and afid; used to implement srv(4)’s -a option.
  • -c β€” multiplex clients onto a single connection to addr, instead of standard input and output.
  • -M β€” do not initialize the connection with a Tversion message; instead assume 9P2000 and a maximum message size of msize.

🌸 SEE ALSO 🌸

⭐ SOURCE ⭐

/src/cmd/9pserve.c


Sign-off time 🫢 This page is 9PSERVE(4) from the Kernel Interfaces Manual, source file /src/cmd/9pserve.c. The footer just says 9PSERVE(4) β€” no date on it β€” so that’s the whole page, bestie πŸ’…βœ¨