I am no expert on file locking but I don't think that's possible.
It is.
$ touch lock $ perl -M5.010 -MFcntl=LOCK_EX -e' open(my $fh, "<", "lock") or die $!; flock($fh, LOCK_EX) or die $!; say "ok"; ' ok
flock locks have nothing to do with reading and writing, and they prevent neither. They merely prevent locks from being obtained.
Seeking work! You can reach me at ikegami@adaelis.com
In reply to Re^2: singleton lock not reliable
by ikegami
in thread singleton lock not reliable
by pidloop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |