PROCDESC(4)
π 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
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2013 Robert N. M. Watson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms