Rémi Bernon (@rbernon) commented about server/thread.c:
#ifdef __linux__ #ifdef RLIMIT_NICE struct rlimit rlimit;
- if (!getrlimit( RLIMIT_NICE, &rlimit ))
+#endif +#ifdef HAVE_SETPRIORITY
- if (setpriority( PRIO_PROCESS, getpid(), -20 ) == 0) nice_limit = -19;
- setpriority( PRIO_PROCESS, getpid(), 0 );
+#endif +#ifdef RLIMIT_NICE
- if (!nice_limit && !getrlimit( RLIMIT_NICE, &rlimit ))
Maybe this could be made clearer in either a comment or the commit title, but the idea is that some users wanted to be able to set privileges through `setcap 'cap_sys_nice=eip'` on wineserver alone, instead of configuring system rlimit.
The if could also be shortened, and the commit message is missing a dot.
```suggestion:-5+0 #ifdef HAVE_SETPRIORITY /* if wineserver has cap_sys_nice we are unlimited, but leave -20 to the user */ if (!setpriority( PRIO_PROCESS, getpid(), -20 )) nice_limit = -19; setpriority( PRIO_PROCESS, getpid(), 0 ); #endif #ifdef RLIMIT_NICE if (!nice_limit && !getrlimit( RLIMIT_NICE, &rlimit )) ```