. Advertisement .
..3..
. Advertisement .
..4..
I’m learning about “How to find task_struct by pid without iterating through the task_struct list”, honestly I don’t know anything about it. Please give me some knowledge about it.
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.
The best solution for ”how to find task_struct by pid without iterating through the task_struct list” is doing one of the following commands:
Another way is using the below command in a module:
You can find
task_struct
in a module by usingfind_task_by_vpid(pid_t nr)
, etc. These functions cannot be exported so they won’t work.You can substitute the following function in a module: