Date: Fri, 09 Nov 2018 18:12:27 +0000 From: bugzilla-noreply@freebsd.org To: threads@FreeBSD.org Subject: [Bug 231848] accept4() doesn't return a socket address when threading is involved Message-ID: <bug-231848-13406-2PipjpfFnB@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-231848-13406@https.bugs.freebsd.org/bugzilla/> References: <bug-231848-13406@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D231848 --- Comment #3 from Anoop C S <anoopcs@autistici.org> --- See attachment for a client-server program and Compile it as follows to reproduce the issue: # cc sv.c -o sv # cc cl.c -lpthread -o cl Run server in one shell: # ./sv Execute client program from another shell with thread count value: # ./cl 10 Output samples: with thread count =3D 5 client: ------- $ ./cl 5 hello world hello world hello world hello world hello world server: ------- $ ./sv=20 1 CONNECTION/S ESTABLISHED 2 CONNECTION/S ESTABLISHED 3 CONNECTION/S ESTABLISHED 4 CONNECTION/S ESTABLISHED 5 CONNECTION/S ESTABLISHED ^C with thread count =3D 10 client: $ ./cl 10 Failed to connect to socket: Connection refused server: $ ./sv=20 1 CONNECTION/S ESTABLISHED 2 CONNECTION/S ESTABLISHED 3 CONNECTION/S ESTABLISHED 4 CONNECTION/S ESTABLISHED 5 CONNECTION/S ESTABLISHED 6 CONNECTION/S ESTABLISHED 7 CONNECTION/S ESTABLISHED 8 CONNECTION/S ESTABLISHED ^C client program is written in such a way that it terminates on receiving ref= usal during a connect() to server. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-231848-13406-2PipjpfFnB>