PR_SET_FPEXC(2const)
β¨ PR_SET_FPEXC β¨
okay bestie, so this is PR_SET_FPEXC, and it lives in section 2const of the manual (that's the "constants that go inside prctl(2) calls" corner of the man-pages universe, iykyk π
). It's a lil' prctl(2) operation and it's genuinely so specific it hurts β it's giving very niche PowerPC excellence.
π LIBRARY
Standard C library (libc, -lc) β the usual girlies.
πΈ SYNOPSIS
#include <linux/prctl.h> /* Definition of PR_* constants */
#include <sys/prctl.h>
int prctl(PR_SET_FPEXC, unsigned long mode);
π DESCRIPTION
So you're setting the floating-point exception mode to mode, right? And mode has to be one of these iconic little values below. No cap, that's the whole gig. π¦
PR_FP_EXC_SW_ENABLEβ use FPEXC for FP exception enables.PR_FP_EXC_DIVβ use FPEXC for floating-point divide by zero.PR_FP_EXC_OVFβ use FPEXC for floating-point overflow.PR_FP_EXC_UNDβ use FPEXC for floating-point underflow.PR_FP_EXC_RESβ use FPEXC for floating-point inexact result.PR_FP_EXC_INVβ use FPEXC for floating-point invalid operation.PR_FP_EXC_DISABLEDβ use FPEXC for FP exceptions disabled.PR_FP_EXC_NONRECOVβ use FPEXC for async nonrecoverable exception mode.PR_FP_EXC_ASYNCβ use FPEXC for async recoverable exception mode.PR_FP_EXC_PRECISEβ use FPEXC for precise exception mode.
like... ten whole options. she's thorough. π«Ά
β RETURN VALUE
- Success? You get
0back. slay. β¨ - Error? You get
-1, anderrnogets set to tell you what went wrong. π
π ERRORS
EINVALβ mode is not a valid value. (aka you handed her a mode she does not recognize, and she is not playing that game, periodt.)
π STANDARDS
Linux. And PowerPC only β she does not exist anywhere else, bestie. This is a PowerPC-exclusive main character moment. π
π§ HISTORY
Linux 2.4.21, 2.5.32. (PowerPC) β old money, fr fr.
π₯ SEE ALSO
and that's the whole page, babe π this was Linux man-pages 6.20, dated 2026-02-08 β PR_SET_FPEXC(2const), signing off πβ¨ go forth and set those floating-point exception modes responsibly, 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
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms