summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorphintuka <phintuka>2011-02-27 20:23:29 +0000
committerphintuka <phintuka>2011-02-27 20:23:29 +0000
commit3443f2f70a66c0c6b40ff73af29c5f0ad541c165 (patch)
tree3f2891780289722195c2e0fa1326c0515fcd4a68 /tools
parentfee2db6e51a3dac97975c9d92394712475dce3ff (diff)
downloadxineliboutput-3443f2f70a66c0c6b40ff73af29c5f0ad541c165.tar.gz
xineliboutput-3443f2f70a66c0c6b40ff73af29c5f0ad541c165.tar.bz2
Do not call vdr's SetPriority() unless geteuid() == 0
Diffstat (limited to 'tools')
-rw-r--r--tools/udp_pes_scheduler.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/udp_pes_scheduler.c b/tools/udp_pes_scheduler.c
index cf465354..c346aae6 100644
--- a/tools/udp_pes_scheduler.c
+++ b/tools/udp_pes_scheduler.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: udp_pes_scheduler.c,v 1.54 2010-05-21 12:47:59 phintuka Exp $
+ * $Id: udp_pes_scheduler.c,v 1.55 2011-02-27 20:23:29 phintuka Exp $
*
*/
@@ -737,7 +737,8 @@ void cUdpScheduler::Action(void)
{
/* UDP Scheduler needs high priority */
const int priority = -5;
- SetPriority(priority);
+ if (geteuid() == 0)
+ SetPriority(priority);
errno = 0;
if ((nice(priority) == -1) && errno)
LOGDBG("cUdpScheduler: Can't nice to value: %d", priority);