Is there any Carbon/Cocoa/C API available on Macs that I can use to enumerate processes? I’m looking for something like EnumProcesses on Windows.
My goal is to check from code whether a process is running (by name).
Thanks!
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.
TechZen says: The Process Manager is, as of Dec 2013, completely deprecated.
Ah, I just found the Process Manager reference
Looks like
GetNextProcessandGetProcessInfohelp in figuring out what’s running. As suggested by Dave,GetBSDProcessListcan be used if you’re looking for daemons and not just Carbon/Cocoa processes.