multiple instances of standalone under Windows

Chris Sheffield revlist at cableone.net
Fri Jan 30 11:13:26 EST 2004


Thanks for the suggestions, Dar, but I think maybe not understand the
'accept' thing.  It sounds like it should work, but I'm not quite getting
it.  You don't by chance have a code sample do you?  How will I know if the
accept command fails?

Chris Sheffield
Software Development
Read Naturally 


-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Dar Scott
Sent: Thursday, January 29, 2004 2:19 PM
To: How to use Revolution
Subject: Re: multiple instances of standalone under Windows



On Thursday, January 29, 2004, at 01:45 PM, Chris Sheffield wrote:

> Does anyone have a way to check if another instance of a standalone is 
> already running, and if so close the one that was just opened?

Try 'accept' on some obscure port.  If it fails, assume that another 
app is running.  (Immediately close any connections in the call back, 
should any be made.)  I'd try UDP first.  If you need to listen to a 
port anyway, you are set.

You could try creating and deleting a folder.  This will work faster 
than a file, I think.  If you need some temp files, anyway, put this 
where you put your temp files and put your temp files in there.  You 
may need to work out the rare case of two programs trying to run at the 
same time.

There is probably some shell command you can use.  That may work well, 
since you only need one platform.  This also needs to address the 
problems of two starting at the same time.

If you feel comfortable with two not starting at the same time, then 
you don't have to worry about that.

The openProcesses() function applies to processes opened with 'open 
process'.

Dar Scott

****************************************
     Dar Scott Consulting
     http://www.swcp.com/dsc/
     Programming Services
****************************************

_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.574 / Virus Database: 364 - Release Date: 1/29/2004
 



More information about the use-livecode mailing list