Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Warn people not to run their applications as root!

  • Loading branch information
slouken committed Mar 25, 2011
1 parent c49ab1b commit c445909f3d5ea5601ecfc88c8440335a99dccc09
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/thread/pthread/SDL_systhread.c
@@ -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;
}

0 comments on commit c445909

Please sign in to comment.