Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12244

Age of a process in the Linux kernel

$
0
0

Given the struct task_struct to work with. What's the best way to determine how old a process is?

The task_struct is used to hold specific pointers to it's next youngest sibling, and oldest child. That no longer seems to be available in some kernel versions.

I'm specifically using the Android goldfish kernel. I've been trying to learn how to use the list_head structure to iterate over processes, but I can't seem to figure out how to determine the age of each child or sibling process.

So, what member or usage of task_struct would do this?


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>