mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
gh-126688: Reinit import lock after fork (#126692)
The PyMutex implementation supports unlocking after fork because we clear the list of waiters in parking_lot.c. This doesn't work as well for _PyRecursiveMutex because on some systems, such as SerenityOS, the thread id is not preserved across fork().
This commit is contained in:
parent
bf224bd7ce
commit
5610860840
4 changed files with 11 additions and 0 deletions
|
@ -21,6 +21,7 @@ extern int _PyImport_SetModuleString(const char *name, PyObject* module);
|
|||
|
||||
extern void _PyImport_AcquireLock(PyInterpreterState *interp);
|
||||
extern void _PyImport_ReleaseLock(PyInterpreterState *interp);
|
||||
extern void _PyImport_ReInitLock(PyInterpreterState *interp);
|
||||
|
||||
// This is used exclusively for the sys and builtins modules:
|
||||
extern int _PyImport_FixupBuiltin(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue