Alexey Izbyshev <izbys...@ispras.ru> added the comment:
> 3. We have to fix error-path in order not to change heap state (contents and > allocations), possibly do not touch locks. During vfork() child execution - > the only parent THREAD (not the process) is blocked. For example, it's not > allowed to touch GIL. Child process may die unexpectedly and leave GIL > locked. Is it possible to rewrite children path for vfork() case without any > Py* calls ? As an idea, we can prepare all low-level things (all the pointers > to strings and plain values) before vfork(), so child code will use only that > data. What specifically do you propose to fix? There is no problem with GIL if the child dies because the GIL is locked and unlocked only by the parent and the child never touches it. Similarly, only Py_* calls known to be safe are used. As for "pointers to strings", it's not clear to me what you mean, but if you mean allocations, they are already done before (v)fork(), since the child code is required to be async-signal-safe even if plain fork() is used. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue47245> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com