note 116782 added to function.flock
| From: | ravenswd at gmail dot com | Date: | Fri, 27 Feb 2015 05:32:18 +0000 |
| Subject: | note 116782 added to function.flock | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-201819@lists.php.net to get a copy of this message | ||
Note that Example #1 contains a bug: ftruncate() does *not* re-set the file pointer to the beginning
of the file. You need to execute a call to rewind() afterward. I realize that the ftruncate page
does mention this, but if anybody copies the example above (as I did), their program will not work
correctly unless they fix this.
----
Server IP: 72.52.91.14
Probable Submitter: 2601:d:3f80:661:4450:fe0b:6400:754f
----
Manual Page -- http://php.net/manual/en/function.flock.php
Edit -- https://master.php.net/note/edit/116782
Del: integrated -- https://master.php.net/note/delete/116782/integrated
Del: useless -- https://master.php.net/note/delete/116782/useless
Del: bad code -- https://master.php.net/note/delete/116782/bad+code
Del: spam -- https://master.php.net/note/delete/116782/spam
Del: non-english -- https://master.php.net/note/delete/116782/non-english
Del: in docs -- https://master.php.net/note/delete/116782/in+docs
Del: other reasons-- https://master.php.net/note/delete/116782
Reject -- https://master.php.net/note/reject/116782
Search -- https://master.php.net/manage/user-notes.php