Cygwin: AF_UNIX: store per-socket info in shared memory

Per-socket info in fhandler isn't correctly shared between multiple
instances of th same descriptor.  Implement a basic shared info which
is shared between all instances of a socket.

This also requires to move the fhandler_socket status bits into
fhandler_socket_wsock since the data is moved to the shared region
for AF_UNIX sockets.

Also, drop backing file requirement for socketpair server socket.
This will be handled differently in recvmsg/sendmsg.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2018-03-12 15:26:12 +01:00
parent c8d96a96ea
commit 725176612d
4 changed files with 238 additions and 80 deletions

View File

@@ -31,8 +31,7 @@ fhandler_socket::fhandler_socket () :
gid (myself->gid),
mode (S_IFSOCK | S_IRWXU | S_IRWXG | S_IRWXO),
_rcvtimeo (INFINITE),
_sndtimeo (INFINITE),
status ()
_sndtimeo (INFINITE)
{
}