may i know the exact usage of getpriority() call used in linux.. even after searching thru net, i couldnt understand it exactly.. can someone explain it with an example.. thnx in advance 🙂
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
So, it returns a priority. It takes two args.
The first arg tells it how to interpret the second arg.
So, if which is PRIO_PROCESS, then ‘who’ is a process id, if it is PRIO_PGRP, it is a
process group id, and if it is PRIO_USER, it is a user ID. A zero of who means the caller.
In the second two cases, the result is to select a set of processes, so it returns the lowest priority number of all of the selected processes.