Review main Abandoned

39893[BUGFIX] Avoid race conditions in typo3temp/Cache

Bernhard Kraft CR 0 V 0 Easy +1 −1 updated 06/25/15, 15:41

Commit message

Race conditions can occur when the cache in typo3temp/Cache gets
cleared, for example by using the Install Tool "Clear all caches"
button. The cache is currently cleared using GeneralUtility::rmdir()
which does a directory traversal and unlinks all contained files.
Instead GeneralUtility::flushDirectory() should get used. This method
renames the directory into a temp-dir name and then removes the temp-dir
using GeneralUtility:rmdir(). But as the rename is atomic there will be
no race condition where files within typo3temp/Cache/ will get recreated
while the cache-clearing process is still running.

Review

  • Code review CR 0

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V 0

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 1