Re: Named AF_UNIX socket not working in cygwin1.dll of git HEAD.
- Date: Wed, 4 Jul 2018 04:17:40 +0900
- From: Takashi Yano <takashi.yano@xxxxxxxxxxx>
- Subject: Re: Named AF_UNIX socket not working in cygwin1.dll of git HEAD.
On Wed, 4 Jul 2018 02:01:08 +0900
Takashi Yano wrote:
> I have check and found this happens only in 32 bit version. I mean
> 32 bit cygwin on 64 bit windows 10. 64 bit version work as expected.
I have looked into this problem, and found calling af_local_set_secret()
in fhandler_socket_local::bind() causes exception 0xc0000005.
Calling RtlGenRandom() in af_local_set_secret() may not be as expected.
While building cygwin1.dll in 32 bit environment, following warning is
shown. This is probably the cause.
Warning: resolving _SystemFunction036 by linking to _SystemFunction036@8
I am not sure why, but the following patch seems to be able solve this
diff --git a/winsup/cygwin/fhandler_socket_local.cc b/winsup/cygwin/fhandler_socket_local.cc
index 2e01f30a2..68786f3a4 100644
@@ -21,7 +21,7 @@
#define u_long __ms_u_long
Takashi Yano <takashi.yano@xxxxxxxxxxx>
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple