Re: Is this program open?
Re: Is this program open?
- Subject: Re: Is this program open?
- From: Douglas Davidson <email@hidden>
- Date: Thu, 13 Apr 2006 11:32:55 -0700
On Apr 13, 2006, at 11:27 AM, John Stiles wrote:
Bear in mind that a running process need not necessarily have a
location in the file system. For example, it is perfectly
possible to launch an executable, leave it running, and delete the
file from which it was launched, leaving the process none the
worse. It sounds like the Carbon Process Manager is what you are
looking for, but what you want may not always be achievable.
Here's the original question. I think it's an achievable goal.
Given a path (or FSRef/NSURL/whatever) to an application's
executable:
/Volumes/MyHD/MyApp.app/Contents/MacOS/MyApp
I want to check to see if this executable is running, hopefully in
a semi-lightweight way (I may be doing this several times for
different apps). It would be cool if the same technique worked for
command-line tools too, but that's not a strict requirement.
Everything else in the discussion is just a means to this end.
It's also possible, for example, that there was an application at /
Volumes/MyHD/MyApp.app that was launched some time ago, and is still
running, but that in the meantime /Volumes/MyHD/MyApp.app has been
replaced with something completely different, that has never been
launched.
Douglas Davidson
_______________________________________________
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