Progress on preventing multiple instances of a program from running in windows

Frank D. Engel, Jr. fde101 at fjrhome.net
Fri Dec 3 10:57:38 EST 2004


The operating system should prevent two different applications from
listening on the same port.  Rev shouldn't have to worry about that at
all.

Rev has to go through the same APIs that C programs do (it is, after
all, written in C/C++, is it not?) so at some level or another, it will
be blocked from doing that, just as any other program would.

OTOH, if Rev does not generate an error when this happens, it is indeed
a problem that Rev will need  to deal with.

It *does* generate an error for me, though; check the value of "the
result" right after the "accept" command.  If the socket does not bind,
it will be nonempty.  At least, for me it is.


On Dec 3, 2004, at 9:27 AM, Alex Tweedly wrote:

> At 11:52 03/12/2004 +0100, thierry wrote:
>
>> Hi,
>>
>> LJ> Hello... the following script seems to work.
>>
>> LJ> Factors to consider:
>> LJ> 1)The stack should be set to purge itself from memory upon closing
>> LJ> 2)Some firewalls might prevent the program from accepting
>> LJ> connections on a port
>> LJ> 3)This prevents multiple instances, but still does not quite allow
>> LJ> the two instances to communicate. Writing to a socket from one 



___________________________________________________________
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com



More information about the use-livecode mailing list