On Thu, Jul 21, 2016 at 03:42:54PM +0300, Ilya Maximets wrote: > On 21.07.2016 15:35, Yuanhan Liu wrote: > > On Thu, Jul 21, 2016 at 03:13:14PM +0300, Ilya Maximets wrote: > >>>> > >>>> What do you think of it? > >>> > >>> I found that we can't check connection status without select/poll > >>> on it. 'getsockopt()' will return 0 with no errors if connection > >>> is not still established just like if it was. > >>> So, I think, the first version of this patch is the only > >>> acceptable solution. > >> > >> Sorry, v2 is acceptable too, because it always calls 'connect()'. > > > > So you have done the test that it works? > > No, it's just theory. I don't know how to test this. > > > I'm more curious to know > > could your above case hit the getsockopt() code path, I mean, the > > path that errno is set to EINPROGRESS or EISCONN? > > As I already told, I don't sure that we're able to get EINPROGRESS > on our AF_UNIX sockets. > In v2 'getsockopt()' check is unnecessary.
We then have no reason to keep it? --yliu