On Fri Dec 1 18:48:12 2023 +0000, Marc-Aurel Zent wrote:
Looking at the man page I think only the target limit matters and probably the reason for https://gitlab.winehq.org/wine/wine/-/merge_requests/4551/diffs?commit_id=89... (I think)
Since Linux 2.6.12, this error only occurs if the caller attempts to
set a process priority outside the range of the RLIMIT_NICE soft resource limit of the target process; see getrlimit(2) for details. So the server priority shouldn't matter at all if I understand this correctly? Will do a bit of testing on that
Ah yeah looks like you're right... Hmm. The server priority might matter in the case where it's priviledged where maybe it can succeed regardless of the target rlimit?
The `min` is probably somehow there tell between the two, but only if we assume the rlimit isn't changed between wineserver start and process start, so maybe a dedicated flag (or server nice limit value) would be better to handle the priviledged case.