reopen_shmem is accidentally called on the parent fhandler
rather than the child fhandler, and it's called too early.
Make sure to call it on the child and only after its shmem_handle
is valid.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
return -1;
}
fhandler_socket_unix *fhs = (fhandler_socket_unix *) child;
- if (reopen_shmem () < 0)
- {
- __seterrno ();
- fhs->close ();
- return -1;
- }
if (backing_file_handle && backing_file_handle != INVALID_HANDLE_VALUE
&& !DuplicateHandle (GetCurrentProcess (), backing_file_handle,
GetCurrentProcess (), &fhs->backing_file_handle,
fhs->close ();
return -1;
}
+ if (fhs->reopen_shmem () < 0)
+ {
+ __seterrno ();
+ fhs->close ();
+ return -1;
+ }
fhs->sun_path (sun_path ());
fhs->peer_sun_path (peer_sun_path ());
fhs->connect_wait_thr = NULL;