]> granicus.if.org Git - python/commit
[3.6] bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066) (GH-5826)
authorAnselm Kruis <a.kruis@science-computing.de>
Fri, 23 Feb 2018 16:27:54 +0000 (17:27 +0100)
committerGregory P. Smith <greg@krypto.org>
Fri, 23 Feb 2018 16:27:54 +0000 (08:27 -0800)
commit9c819a6a7d34594779fea3a25fd69ec5745e185e
treedb03aa63007929538112c00c04ba96902ca5c17c
parentdd52d5c868fb1eb33bcf22e777317de0391bfaf6
[3.6] bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066) (GH-5826)

Make test.support.temp_cwd() fork-safe. The context manager test.support.temp_cwd() no longer removes the temporary directory when executing in a process other than the parent it entered from.
If a forked child exits the context manager it won't do the cleanup..
(cherry picked from commit 33dddac00ba8d9b72cf21b8698504077eb3c23ad)

Co-authored-by: Anselm Kruis <a.kruis@science-computing.de>
Lib/test/support/__init__.py
Lib/test/test_support.py
Misc/ACKS