From c445909f3d5ea5601ecfc88c8440335a99dccc09 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 25 Mar 2011 12:54:21 -0700 Subject: [PATCH] Warn people not to run their applications as root! --- src/thread/pthread/SDL_systhread.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/thread/pthread/SDL_systhread.c b/src/thread/pthread/SDL_systhread.c index 4711b1c49..57d555073 100644 --- a/src/thread/pthread/SDL_systhread.c +++ b/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; }