Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 35550:724bbd489ad4 legacy-trunk
- Changes donated by Elemental Security to make it work on AIX 5.3
with IBM's 64-bit compiler (SF patch #1284289). This also closes SF
bug #105470: test_pwd fails on 64bit system (Opteron).
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 14 Sep 2005 18:09:42 +0000 |
| parents | 81259009ba2c |
| children | f0951fdaed37 |
line wrap: on
line diff
--- a/Python/import.c Wed Sep 14 17:49:54 2005 +0000 +++ b/Python/import.c Wed Sep 14 18:09:42 2005 +0000 @@ -260,6 +260,18 @@ return 1; } +/* This function is called from PyOS_AfterFork to ensure that newly + created child processes do not share locks with the parent. */ + +void +_PyImport_ReInitLock(void) +{ +#ifdef _AIX + if (import_lock != NULL) + import_lock = PyThread_allocate_lock(); +#endif +} + #else #define lock_import()
