LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 01-12-2011, 06:15 PM   #1
papaLou
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.
lou
 
Old 01-20-2011, 10:21 AM   #2
P42
LQ Newbie
 
Registered: Aug 2010
Location: Germany
Distribution: Slackware
Posts: 16

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


Reply


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 03:49 PM
pthread scheduling on a multiprocessor system running Linux rajtendulkar Linux - Software 0 05-11-2010 10:26 AM
pthread scheduling thespartan Linux - Software 1 05-10-2010 08:55 AM
pthread scheduling in ARM EmbeddedSteve Linux - Embedded & Single-board computer 3 02-05-2009 04:05 PM
Pthread scheduling... msriram_linux Programming 3 11-21-2004 04:57 PM


All times are GMT -5. The time now is 11:09 AM.

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