Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 01-12-2011, 05:15 PM   #1
LQ Newbie
Registered: Jan 2011
Posts: 12

Rep: Reputation: 0
Use pthread scheduling policy without root user

I am working on a large program in C to run on Puppy Linux. I have multiple pthreads running. I want to be able to set the pthread SCHED_POLICY and priority in my program but I want a user to be able to run the program without root privilege.
Using a sticky bit and root ownership gives the user too much power because they will be able to write and compile their own scripts.
Is there a way to use 'sudo' when I set the thread parameters from my program or something like this?

Thank you.
Old 01-20-2011, 09:21 AM   #2
LQ Newbie
Registered: Aug 2010
Location: Germany
Distribution: Slackware
Posts: 16

Rep: Reputation: 0
system(sudo --args command);


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scheduling automatic updates as root without user intervention Josh000 Ubuntu 2 06-03-2010 02:49 PM
pthread scheduling on a multiprocessor system running Linux rajtendulkar Linux - Software 0 05-11-2010 09:26 AM
pthread scheduling thespartan Linux - Software 1 05-10-2010 07:55 AM
pthread scheduling in ARM EmbeddedSteve Linux - Embedded & Single-board computer 3 02-05-2009 03:05 PM
Pthread scheduling... msriram_linux Programming 3 11-21-2004 03:57 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:15 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration