[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

JohnM report at bugs.python.org
Fri Apr 20 17:10:10 CEST 2012


JohnM <phlogistonjohn at asynchrono.us> added the comment:

I'm attaching a patch of an emit function implementation that reduces the number of stats and uses fstat were we can. Using fstat should also prevent any races between opening the new file and stating the path in the file system.

Using this patch or something along these lines should avoid the time of check to time of use issues with the current version with repeated stat calls.

----------
keywords: +patch
Added file: http://bugs.python.org/file25290/watchedfilehandler.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14632>
_______________________________________


More information about the Python-bugs-list mailing list