RFR: JDK-8273815: move have_special_privileges to os_posix for POSIX platforms [v2]

Matthias Baesken mbaesken at openjdk.java.net
Fri Sep 17 15:00:56 UTC 2021


On Fri, 17 Sep 2021 12:44:30 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Simplification proposed by Thomas Stuefe
>
> src/hotspot/os/posix/os_posix.cpp line 195:
> 
>> 193:   }
>> 194:   return privileges;
>> 195: }
> 
> Could be shortened to:
> 
> bool os::have_special_privileges() {
>   static bool privileges = (getuid() != geteuid()) || (getgid() != getegid());
>   return privileges;
> }

Hi Thomas, thanks for the hint - I adjusted the coding.
Best regards, Matthias

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

PR: https://git.openjdk.java.net/jdk/pull/5540


More information about the hotspot-runtime-dev mailing list