I want to run my application as a normal user (not superuser) but I want to
raise the priority of one of my threads (real-time priority = SCHED_RR). Is
it possible?
Thank you.
Cédric Pillonel
You need to do one of two things:
1) Make the program setuid root, have it set RR scheduling and immediately
drop root priviledges. Alternatively, make a suid root wrapper that starts
the actual program with normal user priviledges and gives it SCHED_RR from
outside.
2) Arrange for the program to have the CAP_SYS_NICE capability; no root
needed at runtime. In practice you could probably do this e.g. through
the use of a suid root wrapper executable ;P (I don't think there's
official filesystem support for capabilities yet; patches maybe, dunno.)
--
Mikko Rauhala - m...@iki.fi - <URL:http://www.iki.fi/mjr/>
Transhumanist - WTA member - <URL:http://www.transhumanism.org/>
Singularitarian - SIAI supporter - <URL:http://www.singinst.org/>