This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: Work around a z/OS limitation/feature
authorKarl Williamson <khw@cpan.org>
Fri, 11 Dec 2020 21:59:28 +0000 (14:59 -0700)
committerKarl Williamson <khw@cpan.org>
Sat, 12 Dec 2020 15:24:42 +0000 (08:24 -0700)
commita83cff23716a9cfd29d7aa4f1bee292d6c3eec48
treeb3a9e7b6fc6e4f26fc87fed548e20df10d57351a
parentd0f6d176ac4a00ba4b5f98ed79b4163f302a9a1e
locale.c: Work around a z/OS limitation/feature

Without per-thread locales, a multi-thread application is inherently
unsafe.  IBM solves that by allowing you to set up the locale any way
you want, but after you've created a thread, all future locale changes
are ignored, and return failure.

But Perl itself changes the locale in a couple of cases.  Recent changes
have surfaced this issue in one case, leading to a panic.  And this
commit works around it, so that messages will be displayed in the locale
in effect before the threads were created.

The remaining case requires further investigation.  Nothing in our suite
is failing.
locale.c