My program is using the Linux system call setpriority()
to change the priorities of the threads it creates. It needs to set negative priorities (-10) but, as mentioned on the documentation, this fails when run as a normal user.
The user needs the CAP_SYS_NICE
capability to be able to set the priorities as he wants, but I have no idea how to give such capability to the user.
So my question: how to set CAP_SYS_NICE
capability to a Linux user?