Warn people not to run their applications as root!

This commit is contained in:
Sam Lantinga 2011-03-25 12:54:21 -07:00
parent f0b1c9b859
commit a38339ac08

View file

@ -111,6 +111,9 @@ SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority)
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");
return -1;
}