in reply to Re: Re: Re: flock, not unflocking
in thread flock, not unflocking
No! The operating system will close a file when the process goes away even if Perl is killed with signal 9 (SIGKILL) and so doesn't get a chance to even think about cleaning up.
And this will release the lock. If a lock still exists then there is a process that still has the file open or you have a bug in your operating system.
Perhaps the original problem has to do with mod_perl and so there is no separate process and it is Apache itself that still has the file open. I don't know enough about mod_perl but I doubt that a %SIG trap would help this problem. I'm also doubtful (but less so) that an END block would get called in this case and fix the problem (though that would be a neat trick for mod_perl).
- tye (but my friends call me "Tye")
|
|---|