locking $0 has no difference from locking a "separate" file
Quite true, but my words were "creating a separate file" :-)
Also, I was reading between the lines and (possibly incorrectly) came to the conclusion that the OP was trying to prevent simultaneous access to a script. If that was the goal but there were multiple copies of the script or mutliple names (links) then no, the $0 approach wouldn't work.
In reply to Re: Re: Re: Question about Flock and die
by grantm
in thread Question about Flock and die
by acarvalh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |