• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do I find out if a process is running if I have the process Name?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I find out if a process is running if I have the process Name?


  • Subject: Re: How do I find out if a process is running if I have the process Name?
  • From: John Stiles <email@hidden>
  • Date: Thu, 18 May 2006 09:15:26 -0700

Beware! This technique might not be suitable for production code. See http://developer.apple.com/qa/qa2004/qa1361.html

IMPORTANT: Because the definition of the kinfo_proc structure (in <sys/sysctl.h>) is conditionalized by __APPLE_API_UNSTABLE, you should restrict use of the above code to the debug build of your program.

I have a radar filed requesting clarification on QA1123 regarding this, but no word yet.


Christopher Hickman wrote:
http://developer.apple.com/qa/qa2001/qa1123.html

I know that somebody wrote a Cocoa wrapper for this, but a quick search
didn't find it.  I'm sure there's more in the archives if you dig.

Oh, and if you only care about GUI processes, then it's easy: -[NSWorkspace
launchedApplications] gives you a list of all launched apps.

-----Original Message-----
From: cocoa-dev-bounces+tophu=email@hidden [mailto:cocoa-dev-bounces+tophu=email@hidden] On Behalf Of Scott Mitchell
Sent: Thursday, May 18, 2006 11:52 AM
To: Cocoa-Dev List
Subject: How do I find out if a process is running if I have the process Name?


Hi,
This is not necessarily a Cocoa question, but this is for a Cocoa App. I have done a search for this, and have tried to figure this. But what I need to do is, given a process name (Application or other type), how can I find out if that process is running. Because if it is running already I need to do something different. I know this sounds weird, but if I was to explain the whole story behind this, it would take way to long. I thought this would be pretty easy to figure out, but I have not found anything yet.



Thanks, Scott Mitchell Senior Macintosh Software Engineer Excelsior Software http://www.excelsiorsoftware.com


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >RE: How do I find out if a process is running if I have the process Name? (From: "Christopher Hickman" <email@hidden>)

  • Prev by Date: Re: Binding to Accessors of Application Delegate
  • Next by Date: Re: How do I find out if a process is running if I have the process Name?
  • Previous by thread: RE: How do I find out if a process is running if I have the process Name?
  • Next by thread: Re: How do I find out if a process is running if I have the process Name?
  • Index(es):
    • Date
    • Thread