PROCDESC(4)

πŸ’… PROCDESC(4) πŸ’…

okay so bestie, we're in the Kernel Interfaces Manual, section 4 β€” this is the page for PROCDESC, and honestly? it's giving main character energy πŸ¦‹


✨ NAME ✨

procdesc β€” the process descriptor facility πŸ’–

like, it's a whole facility. for process descriptors. iykyk.


🌸 DESCRIPTION 🌸

okay so picture this: procdesc is a file-descriptor-oriented interface to process signalling and control πŸŽ€

the way it works is β€” it supplements the historic Unix primitives fork(2), kill(2), and wait4(2) by adding shiny new system calls on top, namely pdfork(2), pdkill(2), and pdwait4(2) ✨

it's designed to be used with capsicum(4), and what it does there is replace process identifiers with capability-oriented references. iconic behavior honestly πŸ‘‘

BUT β€” and this is the part people miss β€” it can also be used completely independently of capsicum(4) πŸ’« and when you do that, it's displacing PIDs, which may otherwise suffer from race conditions 😭 like, PIDs are out here catching strays and procdesc is the friend who shows up with a better plan, no cap.

and the bestie detail: given a process descriptor, it is possible to query its conventional PID using pdgetpid(2) 🫢 so you never lose the thread of who's who.


πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, bestie, they're all connected:


πŸ“œ HISTORY πŸ“œ

procdesc first appeared in FreeBSD 9.0 ⭐ and it was developed at the University of Cambridge πŸŽ“ periodt.


πŸ‘‘ AUTHORS πŸ‘‘

the legends who built procdesc:

  • Robert Watson <rwatson@FreeBSD.org> and Jonathan Anderson <jonathan@FreeBSD.org> β€” at the University of Cambridge πŸŽ“
  • Ben Laurie <benl@FreeBSD.org> and Kris Kennaway <kris@FreeBSD.org> β€” at Google, Inc. 🌈

ok that's the whole page bestie, you now know procdesc better than most of the internet πŸ’– go forth and descriptor responsibly 🧚

this lil slice of docs comes from the Debian crew, dated October 14, 2018 β€” mwah πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from