• 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: Determine if only single instance is running.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Determine if only single instance is running. (From: "Poonam Virupaxi Shigihalli" <email@hidden>)
 >Re: Determine if only single instance is running. (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: Determine if only single instance is running.
  • Next by Date: Re: Document not Saving Text View Attachment
  • Previous by thread: Re: Determine if only single instance is running.
  • Next by thread: Re: Determine if only single instance is running.
  • Index(es):
    • Date
    • Thread