Is there a way of getting the process id of my C++ application? I am using the Carbon framework, but not Cocoa
+1
A:
Note that you don't actually need to call GetCurrentProcess, you can use the constant kCurrentProcess.
(But getpid is a lot less work if you're not trying to access another process's PID, anyway.)
Nicholas Riley
2008-09-15 00:23:54