summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/import.c')
-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()