Re: Allow only one program to be running
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.