RFR 8043954: Fix behavior difference of connect() for AIX (original) (raw)

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(SOERROR) failed, I did not find any explicit docs about the behavior. but as I tested with some C code snippet, the value of sockoptarg would not be changed if getsockopt(SOERROR) 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(SOERROR) succeeds and I was wondering if the code should actually be: if (sockoptarg != 0 ) { errno = sockoptarg; return -1; } That way the caller of NETConnect will have errno set so that XXXThrowByNameWithLastError 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



More information about the core-libs-dev mailing list