> At 11:34 05/08/2004 -0700, YOSHIFUJI Hideaki wrote:
>
> > > Now, on Linux, at this point, the second instance of the
> > > server fails with EADDRINUSE, even though it did use
> > > SO_REUSEADDR. On FreeBSD 5.1, the second server instance
> > > does successfully bind.
> >
> >This behavior is intended.
> >First socket is REQUIRED to set SO_REUSEADDR
> >I hate BSD's behavior because it is asynmetry.
> >(Both sockets are required to agree on "REUSEADDR.")
>
> Not sure what you mean by "asymetry".
Ferando,
By asymmetry, I understand Hideaki to mean that BSD requires
SO_REUSEADDR in the second server bind(), but not the first.
the Linux philosophy then appears to be symmetry: both server
instances must agree that the socket port is reusable (i.e.,
both must set SO_REUSEADDR).
Cheers,
Michael
--
Michael Kerrisk
mtk-lists@xxxxxxx
NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler!
GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl
|