Actions
Task #56833
closedLocking around fwrite is not needed in append mode
Start date:
2014-03-12
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
easy
Sprint Focus:
Description
There are several calls in the TYPO3 core that use locking around files opened in append note to write using fwrite.
According to the PHP documentation, fwrite is atomic on local file systems.
If handle was fopen()ed in append mode, fwrite()s are atomic (unless the size of string exceeds the filesystem's block size, on some platforms, and as long as the file is on a local filesystem). That is, there is no need to flock() a resource before calling fwrite(); all of the data will be written without interruption.
Unneeded:
GeneralUtility:syslog()
GeneralUtility:deprecationLog()
it should stay in:
MboxTransport::send()
Actions