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

Frank D. Engel, Jr. fde101 at fjrhome.net
Fri Dec 3 12:34:31 EST 2004


Under Mac OS X 10.3.6, the result is empty if the "accept" command 
works, and nonempty if it does not work.

If the "accept" command gives a port number which is in use, the 
"accept" command fails, and the result is nonempty.

That is the behavior I am seeing.

On Dec 3, 2004, at 11:34 AM, Dar Scott wrote:

>
> On Dec 3, 2004, at 8:57 AM, Frank D. Engel, Jr. wrote:
>
>> 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.
>
> I assume you mean "does bind".  What OS?
>
> For me, on Mac OS 9.2 and on Windows XP I'm getting something fishy.
>
> It was some time ago on the Mac.  It might be that its listed twice 
> but is not really opened twice.
>
> On Windows XP, I'm getting no errors and netstat shows muliple 
> listening sockets on the same port.  I reported this as part of bug 
> 828, the original entry for the Mac problem.
>
> It might be that my system is messed up somehow.  Anybody else see 
> this?
>
> However, since I have seen this on the Mac...  Maybe not.  Maybe 
> Revolution is setting the bit to allow address-port pairs to be 
> re-used.  Maybe by accident or maybe for some purpose that I don't 
> understand.
>
> I don't have a problem on OS X.  There I get an error message in the 
> result if the port is in use for accept.
>
> Dar
>
> ****************************************
>     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
>
>
-----------------------------------------------------------
Frank D. Engel, Jr.  <fde101 at fjrhome.net>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten 
Son, that whosoever believeth in him should not perish, but have 
everlasting life.
$



___________________________________________________________
$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