cap_task_setnice(9)
π 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:
cap_capable_helper(9)cap_capable(9)cap_settime(9)cap_ptrace_access_check(9)cap_ptrace_traceme(9)cap_capget(9)cap_capset(9)cap_inode_need_killpriv(9)cap_inode_killpriv(9)kuid_root_in_ns(9)rootid_from_xattr(9)cap_convert_nscap(9)get_vfs_caps_from_disk(9)cap_bprm_creds_from_file(9)cap_inode_setxattr(9)cap_inode_removexattr(9)cap_task_fix_setuid(9)cap_task_setscheduler(9)cap_task_setioprio(9)cap_task_prctl(9)cap_vm_enough_memory(9)cap_mmap_addr(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms