On Fri, 14 Apr 2023 11:58:53 GMT, Jaikiran Pai <j...@openjdk.org> wrote:

>> 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?

The method name `getSoPeerCred` is the one used in ExtendedSocketOptions.java, 
which we are overriding here.
The supported socket option on AIX for is  `SO_PEERID` . I will add `"get 
SO_PEERID failed"`

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

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

Reply via email to