PR_MCE_KILL_SET(2const)
π
PR_MCE_KILL_SET (a 2const moment) β¨
okay bestie, so this is one of those little constant pages that rides along with prctl(2) β it's the manual page PR_MCE_KILL_SET, and honestly? it's giving "short but important." no cap. π
π¦ NAME π¦
PR_MCE_KILL_SET β set the machine check memory corruption kill policy
like... you're literally deciding how your process gets taken out when the hardware starts lying to you. main character energy fr fr π
π LIBRARY π
Standard C library (libc, -lc)
the classic. the iconique. linking against it as we speak π«Ά
β¨ SYNOPSIS β¨
#include <linux/prctl.h> /* Definition of PR_* constants */
#include <sys/prctl.h>
int prctl(PR_MCE_KILL, PR_MCE_KILL_SET, long pol, 0L, 0L);
so you #include both headers β yes BOTH, the linux/prctl.h one is where the PR_* constants live, iykyk β and then you call prctl(2) with PR_MCE_KILL as the first arg, PR_MCE_KILL_SET as the second, your pol sitting in the third slot, and then... 0L, 0L. those two trailing zeros are just vibing there. they're required, they're unused, they're iconic. πΈ
π DESCRIPTION π
so what you're doing here is setting a thread-specific memory corruption kill policy. like, this thread gets its own rules. not the whole process, not the system β just this lil thread. periodt.
and pol is the whole personality of the thing. it's gotta be one of these three:
PR_MCE_KILL_EARLYβ the early kill vibe. π₯PR_MCE_KILL_LATEβ the late kill vibe. π°οΈPR_MCE_KILL_DEFAULTβ whatever the system-wide default is. the "I trust the universe" option. π
Early kill means the thread receives a SIGBUS signal as soon as hardware memory corruption is detected inside its address space. like, immediately. the second the vibes go bad. π
Late kill mode is different β the process is only killed when it accesses a corrupted page. so it can keep chilling until it actually touches the bad memory. π
and if you want the full tea on what SIGBUS actually is and how it behaves, go read sigaction(2). your girl doesn't gatekeep. π
β RETURN VALUE β
- On success β
0is returned. slay. π - On error β
-1is returned, anderrnois set to tell you what went wrong.
no gray area. it's either 0 or it's a whole mood. π
π ERRORS π
EINVALβpolis not a valid value.
that's the one and only error on the list. so if your pol is some made-up nonsense, this is the check that catches you. don't test it. π
π STANDARDS π
Linux.
just Linux. that's the whole section. she said what she said. π§
π HISTORY π
Linux 2.6.32.
ancient. a legend. she's been here since 2.6.32 and she's not leaving. π
π SEE ALSO π
go read the parent page prctl(2) for the big picture, and PR_MCE_KILL(2const) for the sibling constants β they're a matched set, fr fr. π
and that's the whole page bestie!! written up in Linux man-pages 6.20, dated 2026-02-08 β so you know it's fresh, you know it's accurate, and you know your girl did the reading so you don't have to. mwah. π β¨ππ¦
π¦ 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 2010, Andi Kleen <andi@firstfloor.org>
- Copyright 2012-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