Stop multiple copies running on same machine.

Previous topic - Next topic

MrTAToad

Would be nice if a GLBasic detected and stopped multiple programs (all the same of course), from running.

Hemlos

@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?

Bing ChatGpt is pretty smart :O

MrTAToad

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...