PR_GET_KEEPCAPS(2const)
π PR_GET_KEEPCAPS π
okay bestie, so this is a <pink>2const</pink> man page β it's not a whole function, it's one lil' constant you can yeet at prctl(2). And honestly? It's giving "quick check-in with the kernel" energy. β¨
πΈ NAME πΈ
PR_GET_KEEPCAPS β get the state of the "keep capabilities" flag π
π LIBRARY π
Standard C library (libc, -lc) π«Ά
β¨ SYNOPSIS β¨
#include <linux/prctl.h> /* Definition of PR_* constants */
#include <sys/prctl.h>
int prctl(PR_GET_KEEPCAPS);
π DESCRIPTION π
So basically, this call returns the current state of the calling thread's "keep capabilities" flag. That's it. That's the whole vibe. π¦
If you wanna know what this flag actually means β like, why anyone would keep capabilities around β go read capabilities(7), bestie, it explains the whole thing. This page is just the little getter. π
β RETURN VALUE β
On success, this call returns the boolean value described above (the state of the flag, slay). π
On error, -1 is returned, and errno is set to indicate the error. so like, always check. it's giving "not me ignoring the return value" π
π STANDARDS π
Linux. lowkey iconic, highkey expected. π§
π°οΈ HISTORY π°οΈ
Linux 2.2.18. ancient. vintage. a true elder of the kernel. π
π«Ά SEE ALSO π«Ά
fr fr, if you're setting this flag you're probably also reading PR_SET_KEEPCAPS(2const) β they're a matching set, iykyk π
okay that's the whole page, no cap β but credit where it's due: this was written up in the Linux man-pages 6.20 collection, dated 2026-02-08. go off, man-pages maintainers. πβ¨
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- Copyright 2002-2015, Michael Kerrisk <mtk.manpages@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms