in reply to Re: singleton lock not reliable
in thread singleton lock not reliable

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