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 0 back. slay. ✨
  • Error? You get -1, and errno gets 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