[TYPO3-core] RFC: #8980: unlink of non existant lockfiles generates warnings in frontend

Bjoern Pedersen bjoern.pedersen at frm2.tum.de
Wed Sep 22 13:50:34 CEST 2010


Am 22.09.2010 13:38, schrieb André Stösel:
>> Maybe we should check the lockfiles ctime if we can't aquire the lock
>> in order to detect stale lock files. Of course this adds another
>> race possibilty if two processes try to remove the stale lock at the
>> same time, but in this case we can safely ignore any errors of the
>> unlink() call (IOW use @unlink). I think if the files ctime is older
>> than 120 seconds it is safe to assume that it is a stale lockfile.
>>
>> Anyway the fopen(..., "x") prevents the possibility that two (or more)
>> processes aquire the same lock at the same time, so I really think its
>> worth it.
> 
> Patch with check for stale lockfile attached.
> So, are there still any issues?
> I'd love to see this patch in the next version ;)

Shouldn't the time depend on php's max-execution_time? That means, it
should be larger than max_execution_time, then we are shure the process
should be dead?

Björn


More information about the TYPO3-team-core mailing list