PROCDESC(4)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’… PROCDESC(4) β€” process descriptor facility πŸ’…

ok so this is the procdesc page from the Kernel Interfaces Manual (section 4, kernel interfaces bestie, we're in the deep end of the pool 🫢). buckle up, it's actually so good.


✨ NAME ✨

procdesc β€” the process descriptor facility πŸŽ€


🌸 DESCRIPTION 🌸

okay so picture this: procdesc is a file-descriptor-oriented interface to process signalling and control. literally, it's giving "what if processes were fds" and honestly? iconic. πŸ‘‘

here's the lore: historic Unix gave us fork(2) and kill(2) β€” the OGs, the founding mothers, we respect them β€” and procdesc supplements those primitives with new system calls such as pdfork(2) and pdkill(2). it's not replacing them, it's just upgrading the fit. πŸ’…

and here's the main character energy: procdesc is designed for use with capsicum(4), where it replaces process identifiers with capability-oriented references. so instead of passing around raw PIDs like some kind of feral creature, you pass capabilities. very demure, very mindful. ✨

but wait, bestie, there's more β€” it's not capsicum-only! procdesc can also be used independently of capsicum(4), displacing PIDs, which may otherwise suffer from race conditions. like, that's the whole point. PIDs can get recycled out from under you and then you're killing the wrong process and it's a whole thing 😭. no cap, procdesc fixes that vibe.

and if you ever need to know what the boring old PID actually is? given a process descriptor, it is possible to query its conventional PID using pdgetpid(2). so you never lose touch with your roots fr fr. 🌈

heads up: this page is short but the concept is load-bearing. process descriptors are a capability, treat them like one. 🧚

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, they're all connected, it's a whole ecosystem:


⭐ HISTORY ⭐

procdesc first appeared in FreeBSD 9.0, and was developed at the University of Cambridge. πŸŽ“βœ¨ academic baddie behaviour honestly.


πŸ’œ AUTHORS πŸ’œ

procdesc was developed by:

  • Robert Watson <rwatson@FreeBSD.org> and Jonathan Anderson <jonathan@FreeBSD.org> at the University of Cambridge πŸ›οΈ
  • and Ben Laurie <benl@FreeBSD.org> and Kris Kennaway <kris@FreeBSD.org> at Google, Inc. πŸ”₯

absolute legends, all four of them. we stan. 🫢


and that's the whole page bestie, you ate it up βœ¨πŸ’– this one's from the Debian build, dated May 15, 2020 β€” go forth and descriptor responsibly πŸ¦‹πŸŽ€πŸ“

πŸ“¦ where this page comes from