When I'm parsing process IDs from /proc, obviously each thread of a process gets its own ID. And I realize that all the threads in that same process can be gathered from
But my question is, can I assume that the first ID in the list (the lowest numbered one?) is the main thread of the process?
The goal I'm ultimately trying to do is write a quick
ps script in python without using a subprocess or invoking the shell.