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

This is a discussion on Use pthread scheduling policy without root user, c prog in linux within the C Programming forums, part of the General Programming Boards category; I am working on a large program in C to run on Puppy Linux. I have multiple pthreads running. I ...

  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,671
    >> 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, 02:53 PM
  2. Problems adding a user in linux
    By axr0284 in forum Tech Board
    Replies: 1
    Last Post: 12-10-2004, 08:13 AM
  3. installing linux for the first time
    By Micko in forum Tech Board
    Replies: 9
    Last Post: 12-06-2004, 04: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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21