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

Alan Bateman Alan.Bateman at oracle.com
Thu Jun 5 17:53:39 UTC 2014


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(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.

-Alan.



More information about the core-libs-dev mailing list