diff options
author | Guido van Rossum <guido@python.org> | 2005-09-14 18:15:03 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2005-09-14 18:15:03 (GMT) |
commit | e2f5adbc78ade2d280101238a1dc9e7bae2016d6 (patch) | |
tree | 6f10854756ebb669f682537c8c7bfb11aa205305 /Python/import.c | |
parent | e42f446482780553e3e0b3faae1f0300c0a3206d (diff) | |
download | cpython-e2f5adbc78ade2d280101238a1dc9e7bae2016d6.zip cpython-e2f5adbc78ade2d280101238a1dc9e7bae2016d6.tar.gz cpython-e2f5adbc78ade2d280101238a1dc9e7bae2016d6.tar.bz2 |
- 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).
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c index 72a5605..4604714 100644 --- a/Python/import.c +++ b/Python/import.c @@ -259,6 +259,18 @@ unlock_import(void) 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() |