[issue35823] Use vfork() in subprocess on Linux
Ronald Oussoren
report at bugs.python.org
Fri Jan 25 02:41:52 EST 2019
Ronald Oussoren <ronaldoussoren at mac.com> added the comment:
Issue #34663 contains some earlier discussion about vfork, in the context of supporting a specific posix_spawn flag on Linux.
W.r.t. closing all file descriptors > 2: posix_spawn_file_actions_addclose can do this when using posix_spawn. That would have a performance cost, you'd basically have to resort to closing all possible file descriptors and cannot use the smarter logic used in _posixsubprocess. However, the smarter closing code in _posixsubprocess is not safe w.r.t. vfork according to the comment above _close_open_fds_maybe_unsafe: that function uses some functions that aren't async-safe and one of those calls malloc.
----------
nosy: +ronaldoussoren
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35823>
_______________________________________
More information about the Python-bugs-list
mailing list