RFR 8043954: Fix behavior difference of connect() for AIX
Jonathan Lu
luchsh at linux.vnet.ibm.com
Fri Jun 6 10:03:25 UTC 2014
Hi Alan,
On Fri, Jun 6, 2014 at 1:53 AM, Alan Bateman <Alan.Bateman at oracle.com>
wrote:
> On 05/06/2014 11:37, Jonathan Lu wrote:
>
>
> If getsockopt(SO_ERROR) failed, I did not find any explicit docs about
> the behavior.
> but as I tested with some C code snippet, the value of sockopt_arg would
> not be changed if getsockopt(SO_ERROR) failed.
> So I prefer to keep the current approach, does it make sense to you ?
>
> The case that I was wondering about is the common case where
> getsockopt(SO_ERROR) succeeds and I was wondering if the code should
> actually be:
>
> if (sockopt_arg != 0 ) {
> errno = sockopt_arg;
> return -1;
> }
>
> That way the caller of NET_Connect will have errno set so that
> XXX_ThrowByNameWithLastError can create an appropriate exception message.
>
You are right! errno will be checked by other code if NET_Connect() failed,
I've updated the patch, please help to review.
http://cr.openjdk.java.net/~luchsh/JDK-8043954.3/
>
> -Alan.
>
Many thanks
- Jonathan
More information about the core-libs-dev
mailing list