Re: Determine if only single instance is running.
Re: Determine if only single instance is running.
- Subject: Re: Determine if only single instance is running.
- From: Michael Vannorsdel <email@hidden>
- Date: Mon, 22 Feb 2010 12:48:09 -0700
When I have a process that I really don't want running more than once
(some people will run copies or use LaunchServices to launch
multiples) I register a named mach port with NSConnection. When when
an instance launches it checks for that connection and if it exists
the new instance exits out after displaying an error.
Just one method to use, but beware that the bootstrap server limits
what sessions can see registered ports. But it will work to keep the
same user from opening multiple instances.
Other methods are creating a device to check for, a shared memory
page, ect.
On 22 Feb 2010, at 05:59, Poonam Virupaxi Shigihalli wrote:
Hi list,
Is there a way to check an application instance is running. I tried
enabling application prohibits multiple instance in info.plist.
Still i am able to launch multiple instance of the same application.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden