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

@@ -201,6 +201,7 @@ fhandler_socket_wsock::fhandler_socket_wsock () :
wsock_events (NULL),
wsock_mtx (NULL),
wsock_evt (NULL),
status (),
prot_info_ptr (NULL)
{
need_fork_fixup (true);