ps display thread name

前端 未结 3 708
梦谈多话
梦谈多话 2021-02-07 23:12

Is there a way for ps (or similar tool) to display the pthread\'s name? I wrote the following simple program:

// th_name.c
#include 
         


        
3条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-07 23:49

    Show the thread IDs and names of the process with PID 12345:

    ps H -o 'tid comm' 12345
    

提交回复
热议问题