有没有办法获取我的C++应用程序的进程ID?

Dav*_*kes 4 c++ macos macos-carbon

有没有办法获取我的C++应用程序的进程ID?我正在使用Carbon框架,但不是Cocoa ......

Joh*_*ker 6

你能使用unistd.h中的getpid()函数吗?

osx参考