Warn people not to run their applications as root!
This commit is contained in:
parent
f0b1c9b859
commit
a38339ac08
1 changed files with 3 additions and 0 deletions
|
@ -111,6 +111,9 @@ SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority)
|
||||||
value = 0;
|
value = 0;
|
||||||
}
|
}
|
||||||
if (setpriority(PRIO_PROCESS, syscall(SYS_gettid), value) < 0) {
|
if (setpriority(PRIO_PROCESS, syscall(SYS_gettid), value) < 0) {
|
||||||
|
/* Note that this fails if you're trying to set high priority
|
||||||
|
and you don't have root permission. BUT DON'T RUN AS ROOT!
|
||||||
|
*/
|
||||||
SDL_SetError("setpriority() failed");
|
SDL_SetError("setpriority() failed");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue