summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2005-09-14 18:09:42 (GMT)
committerGuido van Rossum <guido@python.org>2005-09-14 18:09:42 (GMT)
commit8ee3e5aa9306a00573817e237bed4a482473e818 (patch)
tree6d5dc937d3b495c5295fe6c5c4b3e212ab5509c0 /Python
parent539c662f10b41d15f658cabfa03cc02902862adc (diff)
downloadcpython-8ee3e5aa9306a00573817e237bed4a482473e818.zip
cpython-8ee3e5aa9306a00573817e237bed4a482473e818.tar.gz
cpython-8ee3e5aa9306a00573817e237bed4a482473e818.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')
-rw-r--r--Python/import.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c
index 7cd5813..9b624a4 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -260,6 +260,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()