You rely on the lock file mechanism of the filesystem.
If your home directory comes over a network connection you'll run into trouble.
And a second user (on a terminal server) can start the program also a second time.
How to ensure my pb app running only once?
Re: How to ensure my pb app running only once?
I use the same approach as infratec. Easy to allow option of 1 or multiple instances.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: How to ensure my pb app running only once?
While technically true, my apps will never be run under such conditions, as they all are consumer apps - nothing that would ever be run in high/higher end corporate environments.infratec wrote:You rely on the lock file mechanism of the filesystem.
If your home directory comes over a network connection you'll run into trouble.
And a second user (on a terminal server) can start the program also a second time.
And to your second point: Just don't use the user's profile directory, but something public - problem solved
PB 5.73 on Windows 10 & OS X High Sierra