[issue30400] Race condition in shutil.copyfile()

Giampaolo Rodola' report at bugs.python.org
Sun Jul 8 12:51:56 EDT 2018


Giampaolo Rodola' <g.rodola at gmail.com> added the comment:

All copy* functions and move() are subjects to race conditions (the only exception is rmtree()). You may solve the race condition in copyfile() but then you'd have the same problem in copystat() and copymode() which are used by copy() and copy2(). The definitive solution to this problem would theoretically be to have all these interconnected functions pass fds instead of "paths" but of course that is hardly possible. Personally I don't think this issue is worth being fixed.

----------

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


More information about the Python-bugs-list mailing list