RFR: JDK-8284726: Print active locale settings in hs_err reports and in VM.info
David Holmes
dholmes at openjdk.java.net
Tue Apr 26 12:49:55 UTC 2022
On Tue, 26 Apr 2022 11:51:40 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> src/hotspot/os/posix/os_posix.cpp line 575:
>>
>>> 573: const char* locale = setlocale(categories[i].c, NULL);
>>> 574: st->print_cr("%s=%s", categories[i].name,
>>> 575: ((locale != NULL) ? locale : ""));
>>
>> I can't see where the query version of setLocale is allowed to return NULL, but if it did isn't that different to being set to "" ?
>
> "The return value is NULL if the request cannot be honored." linux manpage.
> I can print "??" instead?
The Linux manpage is even more vague than the Posix spec. :(
I'd prefer "<null>" or "<not-set>" or "<unknown>" to just "??".
-------------
PR: https://git.openjdk.java.net/jdk/pull/8194
More information about the hotspot-dev
mailing list