pidfd_create(9)
β¨ NAME β¨
pidfd_create β Create a new pid file descriptor. π
Okay so this is the pidfd_create(9) page from the Kernel API Manual, and weβre gonna get you comfy with it, bestie. π«Ά
π SYNOPSIS π
int pidfd_create (struct pid *pid , unsigned int flags );
π§Ύ ARGUMENTS π§Ύ
pidβ thestruct pidthat the pidfd will reference πflagsβ flags to pass β¨
π« DESCRIPTION π«
This creates a new pid file descriptor with the O_CLOEXEC flag set. Slay. β¨
Note, that this function can only be called after the fd table has been unshared to avoid leaking the pidfd to the new process. π Like, read that twice. It matters.
π¨ This symbol should not be explicitly exported to loadable modules. Periodt. π
π RETURN π
On success, a cloexec pidfd is returned. π On error, a negative errno number will be returned. π
π SEE ALSO π
- Kernel file
./kernel/pid.cπ§ pidfd_get_task(9)π¦sys_pidfd_open(9)πΈsys_pidfd_getfd(9)π
Thatβs the whole page, bestie: source/version ./kernel, dated October 2026 β mwah π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms