在linux中获取进程的主线程ID [英] getting main thread id of a process in linux

查看:412
本文介绍了在linux中获取进程的主线程ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以共享一些链接,例如如何从执行中的进程获取主线程id。

解决方案

您可以使用<$获取主线程ID C $ C> pthread_self()

Can anyone share some link,examples as how to get main thread id from a process in execution.

解决方案

You can obtain the main thread id using pthread_self()


这篇关于在linux中获取进程的主线程ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆