bpo-30028: make test.support.temp_cwd() fork-safe by akruis · Pull Request #1066 · python/cpython
Improve the context manager test.support.temp_cwd() to not remove the temporary directory, if a forked child terminates.
Remove an unused "import sys".
Added an explanatory comment and moved the test to test_support.py. I also modified the test to be in line with the other tests of temp_cwd.
An assert might removed depending on Python options.
- better comments - make sure, that the child exits successfully
akruis pushed a commit to stackless-dev/stackless that referenced this pull request
akruis pushed a commit to akruis/cpython that referenced this pull request
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
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 33dddac) Co-authored-by: Anselm Kruis <a.kruis@science-computing.de>
miss-islington added a commit that referenced this pull request
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 33dddac) Co-authored-by: Anselm Kruis <a.kruis@science-computing.de>
akruis pushed a commit to akruis/cpython that referenced this pull request
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 33dddac) Co-authored-by: Anselm Kruis <a.kruis@science-computing.de>
akruis pushed a commit to akruis/cpython that referenced this pull request
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 33dddac) Co-authored-by: Anselm Kruis <a.kruis@science-computing.de>
akruis
deleted the
tempcwd_fork_fix
branch
gpshead pushed a commit that referenced this pull request
…-5825) 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 33dddac) Co-authored-by: Anselm Kruis <a.kruis@science-computing.de>
gpshead pushed a commit that referenced this pull request
…-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 33dddac) Co-authored-by: Anselm Kruis <a.kruis@science-computing.de>