1 |
On 11/14/2015 02:56 PM, Michał Górny wrote: |
2 |
> +def check_locale(): |
3 |
> + """ |
4 |
> + Check whether the locale is sane. Returns True if it is, prints |
5 |
> + warning and returns False if it is not. Returns None if the check |
6 |
> + can not be executed due to platform limitations. |
7 |
> + """ |
8 |
> + |
9 |
> + libc_fn = find_library("c") |
10 |
> + if libc_fn is None: |
11 |
> + return None |
12 |
> + libc = LoadLibrary(libc_fn) |
13 |
> + if libc is None: |
14 |
> + return None |
15 |
|
16 |
We should use a fork to isolate the LoadLibrary call in a child process, |
17 |
in order to avoid triggering a relocation error during glibc upgrades, |
18 |
as reported here: |
19 |
|
20 |
https://bugs.gentoo.org/show_bug.cgi?id=448858 |
21 |
|
22 |
Other than that, the patch looks good now. |
23 |
-- |
24 |
Thanks, |
25 |
Zac |