Re: How to make sure that the target file to read is not under writing by others?

From: Date: Wed, 19 Aug 2009 11:24:37 +0000
Subject: Re: How to make sure that the target file to read is not under writing by others?
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-296961@lists.php.net to get a copy of this message
On Wed, Aug 19, 2009 at 11:59:39AM +0100, Ashley Sheridan wrote: > > No, what you're saying is 'use a log file in order to know when to look > at another log file'. What would happen if you tried to access the > control log file whilst it was in the process of being written to? > Admittedly, you reduce your chances of failure because there is less > data being written to the control log than the actual log, but the > chance of reading incomplete data is still there! > WARNING: total newbie here. If I understood Arno correctly, he was recommending to implement something like the old "/var/run/*pid" files in UNIX. That way, you can control whether or not the previous run is already done with the file before you move on.

« previous php.general (#296961) next »