开发者

How can a program on Linux introspect its pid?

开发者 https://www.devze.com 2023-01-05 23:39 出处:网络
How can a pro开发者_JAVA百科gram on Linux discover the process id of itself?Is there something in /proc/self that will do the trick?getpid(2).Try running on your terminal:

How can a pro开发者_JAVA百科gram on Linux discover the process id of itself? Is there something in /proc/self that will do the trick?


getpid(2).


Try running on your terminal: man getpid

0

精彩评论

暂无评论...
验证码 换一张
取 消