I have the pid (process identifier) of an arbitrary running process. How can I find the bundle identifier (if any) of the associated application?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s a way that works in 10.2 and later: First call
GetProcessForPIDto turn the pid into aProcessSerialNumber. Then callProcessInformationCopyDictionaryto get the bundle ID. (Added: these functions are deprecated in OS 10.9. I don’t know if they still exist in the 10.10 SDK.)