• 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: Allow only one program to be running
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Allow only one program to be running


  • Subject: Re: Allow only one program to be running
  • From: Phillip Hutchings <email@hidden>
  • Date: Mon, 24 Nov 2003 18:07:41 +1300

On 24/11/2003, at 2:50 PM, Peter wrote:

I have a cocoa program which run as a single task for a single user. It have no problem when running Jaguar and below since only one user can use it at one time. However on Panther with the feature "fast user switching", the program can be run by many users. The program was design to run one single process because it takes a lot computer time and it does not share data files (one global directory). It will be a havoc, if 2 or more of the programs running at a same time.

Is it possible to detect another instance of the program running by another user ?

Add

<key>LSMultipleInstancesProhibited</key>
<true/>

To your Info.plist. The OS will prevent a second launch and notify the user, the same way that iTunes handles it.

--
Phillip Hutchings
email@hidden
http://www.sitharus.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Allow only one program to be running (From: Peter <email@hidden>)

  • Prev by Date: Re: Save a NSAppleScript to a file
  • Next by Date: Not able to launch Installer package
  • Previous by thread: Re: Allow only one program to be running
  • Next by thread: screen capture notification?
  • Index(es):
    • Date
    • Thread