ID: 40897
User updated by: david at acz dot org
Reported By: david at acz dot org
-Status: Bogus
+Status: Open
Bug Type: Filesystem function related
Operating System: Any
PHP Version: 5.2.1
New Comment:
O_APPEND is atomic for a single write. php_log_err uses stdio, so a
log entry longer than the stdio buffer size will cause non-atomic
writes.
Try this:
for x in A B; do php -r
'ini_set("error_log","/tmp/test.log");for($i=0;$i<10000;$i++)error_log(str_repeat("'$x'",5000));'
& done
Previous Comments:
------------------------------------------------------------------------
[2007-03-25 14:22:20] [EMAIL PROTECTED]
Append is atomic and does not require locking.
------------------------------------------------------------------------
[2007-03-22 20:39:21] david at acz dot org
Description:
------------
The internal php_log_err function does not lock the output file. This
causes long messages to get mixed together.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40897&edit=1