Robert Shearman wrote:
Robert Reif wrote:
Are there any plans or is anyone working on mapping Windows SetProcessClass and SetThreadPriority support to linux process priorities on kernels that support CAP_SYS_NICE?
Mapping Win32 thread priority levels to Linux nice levels is fairly trivial, but convincing kernel developers to allow unprivileged user-space programs to control thread priorities is the big problem. The last time a discussion like this came up, we (Wine developers and Cedega developers) requested a way of changing a thread's relative priority within a process (without affecting the overall CPU time the process gets). This should be a good compromise between meeting applications' needs and preventing unprivileged applications from freezing the computer. AFAIK, this hasn't been implemented yet.
Rob
Do you need more than CAP_SYS_NICE?
CAP_SYS_NICE gives you:
* Allow raising priority and setting priority on other (different UID) processes * Allow use of FIFO and round-robin (realtime) scheduling on own processes and setting the scheduling algorithm used by another process.
wineserver would need to be a setuid program but it could set CAP_SYS_NICE at startup and immediately reduce it's privileges back to normal.