Thread: Use pthread scheduling policy without root user, c prog in linux

  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    5

    Use pthread scheduling policy without root user, c prog in linux

    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

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    >> I want to be able to set the pthread SCHED_POLICY and priority in my program ...
    That in of itself may be the problem. Is there any reason why your design must depend on scheduling and priority?

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SSH Hacker Activity!! AAHHH!!
    By Kleid-0 in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 03-06-2005, 03:53 PM
  2. Problems adding a user in linux
    By axr0284 in forum Tech Board
    Replies: 1
    Last Post: 12-10-2004, 09:13 AM
  3. installing linux for the first time
    By Micko in forum Tech Board
    Replies: 9
    Last Post: 12-06-2004, 05:15 AM
  4. never compile as root!
    By Lynux-Penguin in forum Linux Programming
    Replies: 6
    Last Post: 08-21-2003, 05:46 PM

Tags for this Thread