Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 35551:57f630a9de26 2.4
- 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:15:03 +0000 |
| parents | 25378bdb1b3a |
| children | 172fcd9c1952 |
line wrap: on
line diff
--- a/Python/import.c Wed Sep 14 17:54:39 2005 +0000 +++ b/Python/import.c Wed Sep 14 18:15:03 2005 +0000 @@ -259,6 +259,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()
