I'm porting some linux code to mac os. On linux I was able to read the /proc/[pid]/comm file to get the pid of an process by it's name. However on mac os x is no /proc filesystem. So, how is it done on mac?
Asked
Active
Viewed 1,724 times
0
-
Duplicate? https://stackoverflow.com/questions/11780718/how-to-get-get-process-by-name-on-mac-os – François Andrieux Jan 16 '18 at 19:05
-
possible duplicate of [Using NSProcessInfo from C++](https://stackoverflow.com/q/41184989/2630032) – Stephan Lechner Jan 16 '18 at 19:06
-
1I saw the answer, but it uses objective c. I would like to do it in pure c/c++ – HenrikS Jan 16 '18 at 20:38