PR_GET_IO_FLUSHER(2const)
π PR_GET_IO_FLUSHER π
okay bestie, pull up a chair, we're reading the PR_GET_IO_FLUSHER page from Linux man-pages, section 2const π
β¨ NAME β¨
PR_GET_IO_FLUSHER β literally just peeks at your IO_FLUSHER state. that's the whole job. no cap. π
π LIBRARY π
Standard C library, aka libc, link it with -lc. the basics, the bread and butter, the moment π«Ά
πΈ SYNOPSIS πΈ
#include <linux/prctl.h> /* Definition of PR_* constants */
#include <sys/prctl.h>
int prctl(PR_GET_IO_FLUSHER, 0L, 0L, 0L, 0L);
so like, you include both of those headers, the linux/prctl.h one is where all the PR_* constants are defined (iykyk), and then you hit prctl with PR_GET_IO_FLUSHER as the first arg and a whole lotta zeroes chilling in the rest of the slots. four of them. 0L each. she's simple like that π
π¦ DESCRIPTION π¦
okay so here's the tea β this call returns the IO_FLUSHER state of the caller. as in, you. the one calling it. it's giving vibe check but for your own flusher status.
the value it hands back:
1β you ARE in the IO_FLUSHER state π0β you are NOT in the IO_FLUSHER state π
that's it. boolean behaviour, no in-between, no "maybe", no "it's complicated". periodt.
β οΈ important bestie β the calling process must have the CAP_SYS_RESOURCE capability. no cap (well, yes cap, that's literally the point π). no capability, no answer.
π RETURN VALUE π
on success? she returns that boolean value we just talked about β the 1 or the 0, the yes or the no, the slay or the not-slay β¨
on error? -1 comes back at you and errno gets set to tell you what went wrong. classic. iconic. never changes π
β STANDARDS β
Linux. that's it, that's the standard. π§
π HISTORY π
Linux 5.6. she's been around since 5.6, a whole era, a legend fr fr π
π SEE ALSO π
like yeah, go check the setter if you wanna change your flusher state instead of just snooping on it. they're a matching pair, a duo, main character energy together π«Ά
and that's the whole page, bestie β no crumbs left behind π β¨
this lil tour was brought to you by Linux man-pages 6.20, dated 2026-02-08, and the letters P, R, and _ π go forth and query your flusher state, you absolute icon πΈπ¦
π¦ 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 2020, Mike Christie <mchristi@redhat.com>
- Copyright 2020, 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