How are you catching the signals? If you don't catch the TERM signal,
no DESTROY method will every be called, and that's where the lock file
is removed.
What platform are you running on?
You might try editing FileRotate.pm and add print statements to see if
a) the DESTROY method is called at exit, and b) if the unlink() call if
failing for other reasons.
ch...@gm... wrote:
> Thanks for your fast answer.
> It is a long running process, but the files were not deleted after exit.
> I terminate with SIGTERM which I handlet in a signal hander. Do I have
> to call a special termination/deregistration function of log4perl or
> anything else?
>
> best regards
> Chirs
>
> Kevin Goess wrote:go
>
>> Hey, Chris,
>>
>> My javamap::rollingfileappender is just a wrapper around
>> Log::Dispatch::FileRotate
>> (http://cpan.uwinnipeg.ca/htdocs/Log-Dispatch-FileRotate/Log/Dispatch/FileRotate.html)
>> by Mark Pfeiffer, you could ask him.
>>
>> But from looking at the code it looks like the lockfiles should be
>> deleted when the process exits. If you have a long running process
>> that doesn't exit, then the lockfiles won't go away.
>>
>> ch...@gm... wrote:
>>
>>> hi!
>>>
>>> Im using your javamap::rollingfileappender and be quite happy with it.
>>> but: it creates a lockfile .<name>.LCK.<num>. This stays at disk. Is
>>> there a option to disable?
>>> Or I'm wrong in closing? Is there a builtin way to cleanup?
>>> To delete all .*.LCK.* every time is not very elegant.
>>>
>>> best regards
>>> Chris
>>
>>
>>
>
--
Happy Trails . . .
Kevin M. Goess
(and Anne and Frank)
904 Carmel Ave.
Albany, CA 94706
(510) 525-5217
|