]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42146: Unify cleanup in subprocess_fork_exec() (GH-22970)
authorAlexey Izbyshev <izbyshev@ispras.ru>
Sun, 1 Nov 2020 05:33:08 +0000 (08:33 +0300)
committerGitHub <noreply@github.com>
Sun, 1 Nov 2020 05:33:08 +0000 (22:33 -0700)
commitd3b4e068077dd26927ae7485bd0303e09d962c02
tree5ab2b61abda89577aa74d5713957976c3f551c6a
parent3bf0d02f2817c48b6ee61a95b52a6d76ad543be9
bpo-42146: Unify cleanup in subprocess_fork_exec() (GH-22970)

* bpo-42146: Unify cleanup in subprocess_fork_exec()

Also ignore errors from _enable_gc():
* They are always suppressed by the current code due to a bug.
* _enable_gc() is only used if `preexec_fn != None`, which is unsafe.
* We don't have a good way to handle errors in case we successfully
  created a child process.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Modules/_posixsubprocess.c