0

I need to find some Process in the list of running process by its name. I thought, that it's a very simple task, but no...

I read similar questions on this site but still don't found a simple answer.

Process Manager Reference allows to get list of only open processes.

This solution is not bad, but some-wise don't contains needed application in the result list, even if I see it in 'top'.

Anybody knows a working solution of such task?

Thanks!

Peter Hosey
  • 95,783
  • 15
  • 211
  • 370
kaa
  • 1,265
  • 5
  • 22
  • 39

1 Answers1

0

Did you checkout following post (and associated comments): http://jongampark.wordpress.com/2008/01/26/a-simple-objectie-c-class-for-checking-if-a-specific-process-is-running/

Also: Getting process list and hiding a specific app

Community
  • 1
  • 1
Bo.
  • 2,547
  • 3
  • 24
  • 36
  • On the other hand you can grab output from 'top' or similar command and try to get info from it. Check out the following post: http://stackoverflow.com/questions/412562/execute-a-terminal-command-from-a-cocoa-app/696942#696942 – Bo. May 07 '12 at 13:28
  • Thanks, to all for suggestions. I will use solution from first answer, with some modifications. As I remember NSWorkspace shows only user applications and do not see daemons, unfortunately. And I wonder - why cocoa, or other framework don't implements a class, that provides possibility to get access to all kind of running processes. – kaa May 07 '12 at 16:13