![]() |
|
There's more than one way to do things | |
PerlMonks |
Re: Ensure Only One Instance of Your Script is Running... with 'ps -ef' ?by LanX (Saint) |
on Dec 05, 2022 at 22:21 UTC ( #11148584=note: print w/replies, xml ) | Need Help?? |
I think you are applying flock in a wrong way, which offers race conditions. The lock must happen in one atomic step and only the script having the lock must be allowed to write. Not the script which created the locked file. Did you try the code I offered?
Cheers Rolf
EditImproved wording
In Section
Seekers of Perl Wisdom
|
|