Perl-Sensitive Sunglasses | |
PerlMonks |
Re^2: File lock demoby LanX (Saint) |
on Apr 21, 2021 at 19:44 UTC ( [id://11131543]=note: print w/replies, xml ) | Need Help?? |
Thanks, very informative!!! :) In my case I'm indeed logging the PID, but as a name of another file plus timestamp. And I'm indeed writing content into that other file. My issue is that Windows (or maybe the way flock is ported to Win) doesn't allow me to read a file which is "partially locked" by Perl. (at least I couldn't figure out how) Hence the content is only readable if no script is running. This is most probably different on Linux but caused me much headache to debug and led me to the shown solution with an empty lock-file.
Cheers Rolf
In Section
Meditations
|
|