PR_GET_AUXV(2const)
π PR_GET_AUXV π
okay so bestie, welcome to the PR_GET_AUXV(2const) page β yes that's a real man page section name, const pages are a whole thing, we love her for it.
This one lives in the Standard C library (libc, -lc), no cap, and it's the vibe where you ask the kernel to hand over your auxiliary vector. iconic behaviour honestly. π
β¨ SYNOPSIS β¨
#include <linux/prctl.h> /* Definition of PR_* constants */
#include <sys/prctl.h>
int prctl(size_t size;
PR_GET_AUXV, void auxv[size], unsigned long size, 0L, 0L);
yes it's a prctl() call, yes she eats five arguments, and yes the last two are just 0L, 0L because that's the assignment. π«Ά
πΈ DESCRIPTION πΈ
So the whole point: you're getting the auxiliary vector (affectionately known as auxv) copied into the buffer that auxv points at. The size of that buffer? That's what you pass in size. literally it's right there in the name bestie. π
And here's the tea β if your buffer is not long enough for the full auxiliary vector, the copy will be truncated. it's giving "we tried our best" energy. π
π RETURN VALUE π
- On success, this call returns the full size of the auxiliary vector. yes, the full size, even if you only gave her a tiny buffer and she had to truncate β she's telling you how much room she needed. main character behaviour fr fr. β¨
- On error,
-1is returned, anderrnois set to indicate the error. classic. π
π ERRORS π
EFAULTβauxvis an invalid address. ma'am that's not a pointer that's a problem. π
β STANDARDS β
Linux. just Linux. she's exclusive. π
π¦ HISTORY π¦
Linux 6.4. a somewhat recent queen, so check your kernel before you start drama. π₯
π SEE ALSO π
and that's the whole page bestie, go forth and fetch that auxv πβ¨ this was brought to you by Linux man-pages 6.20, dated 2025-06-28 β mwah, slay, periodt π ππ
π¦ 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
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms