The unreliability of AF_UNIX datagram sockets
Corinna Vinschen
corinna-cygwin@cygwin.com
Thu Apr 29 15:18:16 GMT 2021
On Apr 29 17:05, Corinna Vinschen wrote:
> On Apr 29 10:38, Ken Brown wrote:
> > Sounds great. Thanks.
>
> Don't start just yet.
>
> I'm still not quite sure if that's really the way to go. As I see it we
> still have something to discuss here.
>
> For one thing, using native AF_UNIX sockets will split our user base
> into two. Those who are not using a recent enough Windows will get the
> old code and no descriptor passing. However, if an application has been
> built with descriptor passing, it won't work for those running older
> Windows versions. I don't think we want that for the distro, or, do we?
>
> Next problem... implementing actual STREAM sockets. Even using native
> AF_UNIX sockets, these, too, would have to encapsulate the actual
> payload because of the ancilliary data we want to send with them.
> Whether or not we use native AF_UNIX sockets, they won't be compatible
> with native applications...
While searching the net I found this additional gem of information:
Native AF_UNIX sockets don't support abstract sockets. You must bind to
a valid path, so you always have a visible file in the filesystem.
Discussed here: https://github.com/microsoft/WSL/issues/4240
We could workaround that with our POSIX unlink semantics, probably,
but it's YA downside.
Corinna
More information about the Cygwin-developers
mailing list