ID: 25814 Updated by: [EMAIL PROTECTED] Reported By: mike at aqua-helix dot com -Status: Open +Status: Closed Bug Type: Filesystem function related Operating System: Linux RedHat 7.3 PHP Version: 4.3.4RC1 New Comment:
This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2003-10-09 19:13:47] mike at aqua-helix dot com Description: ------------ >From documentation about 'flock': The optional third argument is set to TRUE if the lock would block (EWOULDBLOCK errno condition) Actualy third argument will never set to true due to error in implementation. Let see the code (line 253 in 'file.c'): if ((ret=flock(fd, act)) == -1) { RETURN_FALSE; } if(ret == -1 && errno == EWOULDBLOCK && arg_count == 3) { ZVAL_LONG(*arg3, 1); } The second 'if' will never act as if ret==1 function immediately returns false in the first 'if' Here is my version: if ((ret=flock(fd, act)) == -1) { if( errno == EWOULDBLOCK && arg_count == 3) ZVAL_LONG(arg3, 1); RETURN_FALSE; } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25814&edit=1