summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/import.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/Python/import.c b/Python/import.c
index cbfb7615e2..43eabb830b 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -298,15 +298,17 @@ _PyImport_ReleaseLock(void)
}
/* This function is called from PyOS_AfterFork to ensure that newly
- created child processes do not share locks with the parent. */
+ created child processes do not share locks with the parent.
+ We now acquire the import lock around fork() calls but on some platforms
+ (Solaris 9 and earlier? see isue7242) that still left us with problems. */
void
_PyImport_ReInitLock(void)
{
-#ifdef _AIX
- if (import_lock != NULL)
- import_lock = PyThread_allocate_lock();
-#endif
+ if (import_lock != NULL)
+ import_lock = PyThread_allocate_lock();
+ import_lock_thread = -1;
+ import_lock_level = 0;
}
#endif