RFR: 8305089: Implement missing socket options on AIX [v4]

Jaikiran Pai jpai at openjdk.org
Fri Apr 14 12:01:34 UTC 2023


On Fri, 14 Apr 2023 11:33:13 GMT, Varada M <duke at openjdk.org> wrote:

>> I'm curious, what is the rationale?
>> By comparison the Linux version has: 
>> 
>>         handleError(env, rv, "get SO_PEERCRED failed");
>
> On linux it is implemented from [attachListener_linux.cpp](https://github.com/openjdk/jdk/blob/master/src/hotspot/os/linux/attachListener_linux.cpp#L361) and on aix it is from [attachListener_aix.cpp](https://github.com/openjdk/jdk/blob/master/src/hotspot/os/aix/attachListener_aix.cpp#L392)
> In both the cases when rv == -1 , it fails to get this socket option.

Hello Varada, so the Linux version uses `SO_PEERCRED` socket option and when it fails, the error message says "get SO_PEERCRED failed". The AIX version uses `SO_PEERID` and if it fails, the current proposed form in this PR will report the error message as "get  failed" which wouldn't be too informative.

I'm guessing that the reason you didn't include the socket option in the error message is perhaps because the native socket option (on AIX) is `SO_PEERID` but this method is named `getSoPeerCred`. So it might be confusing to report `SO_PEERID` in the error message. Maybe you could change the message to just "getSoPeerCred failed"  instead?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13240#discussion_r1166743891



More information about the build-dev mailing list