From e2f5adbc78ade2d280101238a1dc9e7bae2016d6 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 14 Sep 2005 18:15:03 +0000 Subject: - 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). --- Python/import.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Python') diff --git a/Python/import.c b/Python/import.c index 72a5605271..460471403a 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() -- cgit v1.2.1