No one else mentioned this so I will - you are not using LOCK_UN safely. Under 99.9% of all circumstances you will want to have close() handle that for you. I didn't say 100% because while I don't know of any case where you actually would use LOCK_UN, I suppose it exists for a reason so there must be some reason, however obscure and remote, that it exists.
Just don't do it.
In reply to Re: use flock() to determine if other script is running
by diotalevi
in thread use flock() to determine if other script is running
by Red_Dragon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |