GLBasic forum

Feature request => IDE/Syntax => Topic started by: MrTAToad on 2008-Nov-19

Title: Stop multiple copies running on same machine.
Post by: MrTAToad on 2008-Nov-19
Would be nice if a GLBasic detected and stopped multiple programs (all the same of course), from running.
Title: Re: Stop multiple copies running on same machine.
Post by: Hemlos on 2008-Dec-03
@Ocean:
I was thinking about this in the way of data files, but came to the conclusion that it will fail if a program is prematurely exited, thus causing a program lockup in the datafile. Result: not good.

Interesting concept, i read up on semaphores on wikipedia..
Do you know if there is a way to do this in GLBasic code, without using inline C code?

Title: Re: Stop multiple copies running on same machine.
Post by: MrTAToad on 2008-Dec-03
In Windows its easy enough - try and create a mutex - if it fails, then the program is already running.

Will have to look in Linux and Mac versions...