Sunday, March 9, 2014

Given a pid, how will you distinguish if it is a process or a thread ?

Do ps -AL | grep pid
1st column is parent id and the second column is thread (LWP) id. if both are same then its a process id otherwise thread.

1 comment: