-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
process: support getting Process for current thread #206
base: master
Are you sure you want to change the base?
Conversation
jgowans
commented
Sep 24, 2022
•
edited
Loading
edited
060153c
to
3239205
Compare
Updated the branch to include another commit to fix the failing random test. |
Getting info about the current thread is useful when the data for the current thread is different to that of the thread group leader process. For example, schedstats. Signed-off-by: James Gowans <[email protected]>
3239205
to
4ce9df3
Compare
I have to admit I learned something while reviewing this PR: I didn't realize that you could read So three questions for you, all related:
|
Hey @jgowans -- just checking in to see how you want to proceed here. |
Hi @eminence; apologies I missed your reply! 🤦
There do seem to be slight differences, for example:
Even the "parent task" ( So I guess this is the "process view" and "task view", independent of whether the ID is actually a parent or a thread.
The procfs man mage also has a nice write up; some relevant parts:
Yes, that seems much better. Anything which is a wrapper around /proc/pid/task/* should be a struct Task. I actually just hadn't seen the Task struct yet. Will update.
I'd say no. For that API specifically, it is implemented as getting data from /proc/pid/task/pid, hence gets the "task view" of that process because it's using the
|