cap_task_setnice(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cap_task_setnice(9) β€” like, the kernel API manual bestie

okay so this is a section 9 (kernel API) manual page, and honestly? it's a little one but she's important. it's cap_task_setnice and she's about to do a vibe check on whether you're allowed to change a task's niceness. yes bestie, niceness is real, it's a kernel thing, we love her πŸ’–


✨ NAME ✨

cap_task_setnice β€” determine if task priority change is permitted

like, she's the bouncer at the club and she's checking if your priority-change ass is on the list 🫢


✨ SYNOPSIS ✨

int cap_task_setnice (struct task_struct *p , int nice );

literally the whole signature, character for character, do not @ me πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • p β€” the task to affect. the main character in question πŸ‘‘
  • nice β€” the nice value to set. yes that's really the parameter name, and yes it's sending me 😭

🌸 DESCRIPTION 🌸

okay so the whole job here: determine if the requested task priority change is permitted for the specified task.

that's it. that's the function. she checks, she answers, she moves on. lowkey iconic for minding her own business ✨


🌈 RETURN 🌈

  • 0 β€” permission is granted, slay, go change your priority πŸŽ‰
  • -ve β€” denied. negative value. not today bestie πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./security/commoncap.c β€” and then the whole friend group, because apparently everyone in security/commoncap.c knows each other:

like, that's the whole group chat right there, no cap 🫢


fr fr read these before you go poking at capability checks, iykyk 🧚

okay that's the page!! huge shoutout to the source ./security and the date October 2026, and obviously to cap_task_setnice(9) herself for showing up and doing her little permission check. periodt πŸ’œπŸŽ€

πŸ“¦ where this page comes from