When the listening backlog is full for STREAM unix-domain sockets, connect(2)
fails on most systems with ECONNREFUSED. It would be preferable for it to return EAGAIN.
The reasoning is that it is highly useful to be able to distinguish between the two cases of dead socket (node exists in filesystem, but no process listening anymore) and the case of full backlog. I ran into this problem when porting some Linux software which has some code to clean up dead sockets, but it's a security vulnerability if the code can be tricked into deleting sockets by spamming them to fill up their backlog.
Only Linux returns EAGAIN; AIX, Solaris and Darwin follow BSD behaviour (just tested on each).
POSIX doesn't list EAGAIN as a possible return code from connect() (link), so there may be some compliance issue here.
What's the best route to get everyone to change in line with Linux? I could go and file a bug report with Oracle, Apple, a FreeBSD PR, and fight it out on the mailing lists of each organisation. Or should I pester someone in a standards body (Austin group)? Is it even advisable to try and get everyone to change here, even though the advantage is clear?