[omniORB] potential bug: two ORBs with the same endPoint

Igor Lautar igor.lautar at hermes.si
Fri May 19 14:32:39 BST 2006


Hi,

On Friday 19 May 2006 13:22, Duncan Grisby wrote:
> Are you using Windows?  I expect so.

Yes, I forgot to mention it.

> The problem is not with omniORB, it is with Windows' interpretation of
> the SO_REUSEADDR socket option. omniORB binds using that option so that
> if a server crashes it is immediately able to rebind to the same
> address. Unfortunately, Windows allows a process to bind to an address,
> even if another process is still using it. There's no way to avoid it
> other than not specifying SO_REUSEADDR, but then people would be
> complaining that their servers fail to start immediately after a
> previous run stopped.
>
> Unix platforms correctly fail to allow you to bind if another process is
> already bound.

Ok, so what is the common way to handle this? Because it is to late to do 
proper error handling if OBJECT_NOT_EXIST is returned somewhere after ORB 
initialization, just because port was used. And checking if port is used 
before doing ORB_init does not solve the problem (something else could come 
inbetween checking and ORB_init binding to it).

Regards,
Igor



More information about the omniORB-list mailing list