How can i get a process by know process name on mac os?
A:
Your question is rather vague. Can you define what you mean by "get a process"?
One method (depending on your definition): launch the Activity Monitor app in Applications/Utilities, and look up the process name in the list.
Shaggy Frog
2010-04-06 08:17:23
I finished it!My sample:bool IsInBSDProcessList(char *name)// Return YES if given name process in process list . Otherwise return NO{ assert( name != NULL); kinfo_proc *result; size_t count = 0; result = (kinfo_proc *)malloc(sizeof(kinfo_proc)); if(GetBSDProcessList( i < count; i++) { kinfo_proc *proc = NULL; proc = if(strcmp(name, proc->kp_proc.p_comm) == 0) { free(result); return true; } } } free(result); return false;}
Haley
2010-05-18 05:41:09