> Assuming each thread has its own copy of $this->fp, even after renaming the > log file all other threads will still be pointing at the old file. The > resource is connected to the inode, not the filename, so even if the > filename changes the inode does not, therefore the actual location on disk > represented by the resource does not. Actually I thought pretty similar before. I will test the option below too thanks! > I would fix this by doing the following after acquiring the lock... > 1. Close the file > 2. Reopen the file > 3. Seek to the end > 4. Then do the ftell > Alternatively it could just do a filesize on the filename to get the current > size rather than using ftell on the resource. If the size is less than ftell > then another thread has rolled it over and this thread needs to close and > reopen the file. If they match, roll the file over. > -Stuart > > -- > Stuart Dallas > 3ft9 Ltd > http://3ft9.com/ -- http://www.grobmeier.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php