[issue35823] Use vfork() in subprocess on Linux

Alexey Izbyshev report at bugs.python.org
Sat Oct 24 13:29:41 EDT 2020


Alexey Izbyshev <izbyshev at ispras.ru> added the comment:

> Thank you for taking this on!  I'm calling it fixed for now as the buildbots are looking happy with it.  If issues with it arise we can address them.

Thank you for reviewing and merging!

Using POSIX_CALL for pthread_sigmask() is incorrect, however, since it *returns* the error instead of setting errno. I've opened a PR with a fix and additional handling of the first pthread_sigmask() call in the parent (which can be done easily).

I've also noticed a memory leak why doing the above: cwd_obj2 is not released on the error path. It probably slipped with patches adding user/groups support. I'll file a separate issue.

Would you also clarify why you disallowed vfork() in case setsid() is needed? Have you discovered any potential issues with setsid()? Note that setsid() doesn't suffer from thread sync issues like setuid()/setgid()/etc.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35823>
_______________________________________


More information about the Python-bugs-list mailing list