[New-bugs-announce] [issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe

Alexey Izbyshev report at bugs.python.org
Mon Feb 5 20:34:03 EST 2018


New submission from Alexey Izbyshev <izbyshev at ispras.ru>:

_Py_set_inheritable() raises a Python-level exception on error and thus is  not async-signal-safe, but child_exec() must use only async-signal-safe functions because it's executed between fork() and exec().

Since a non-raising version is already implemented in Python/fileutils.c for internal use (set_inheritable), I suggest to simply expose it via another public function (similar to _Py_open_noraise(), etc.).

----------
components: Library (Lib)
messages: 311699
nosy: izbyshev, vstinner
priority: normal
severity: normal
status: open
title: subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe
type: behavior
versions: Python 3.6, Python 3.7

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


More information about the New-bugs-announce mailing list