[issue37650] TemporaryDirectory objects should LOCK_SH to avoid being deleted by systemd-tmpfiles

2019-07-22 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +14684 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14908 ___ Python tracker ___ __

[issue37650] TemporaryDirectory objects should LOCK_SH to avoid being deleted by systemd-tmpfiles

2019-07-22 Thread Ryan Gonzalez
New submission from Ryan Gonzalez : If e.g. a tar archive is extracted that has dates from several months ago, if systemd-tmpfiles runs to clean up data, then it may delete that data while the directory is still being used. This can be avoided by holding a LOCK_SH on the directory while it's