in reply to Re: flock(), dodgy return?
in thread flock(), dodgy return?
Thanks oxone,
I agree with you, its a bit of a state - rest assured it wont end that way. The semaphore was a product of desperation. Its been the sort of week where everything has gone wrong (and its only wednesday!?) and so I was kinda scrabbling at the problem rather than calmly dealing with it.
With regards to not using LOCK_NB, I don't think I can go that way. This script is called, eventually, from a GUI app and I'd rather not leave the user hanging on indefinitely, even if in 99.99% of cases the lock will only exist for fractions of a second. I keep coming over sysopen but have never used it - tbh open() works fine and is what all the scripts here use and I'd rather not move away from that.
|
|---|