Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Warn people not to run their applications as root!
  • Loading branch information
slouken committed Mar 25, 2011
1 parent c49ab1b commit c445909
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/thread/pthread/SDL_systhread.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit c445909

Please sign in to comment.