Re: Bug#526195: perl: flock locking should be implemented in terms of fcntl
Roger Leigh <email@example.com> writes:
> Apparently, it's possible to configure perl with -Ud_flock (I think
> that's the correct option) to make it emulate flock() with fcntl(2).
> If there are no compatibility reasons to switching to fcntl for more
> robust locking, it might be a nice improvement to use this option.
> pp_sys.c shows the necessary configured options to select the desired
> Perl itself offers only a high-level interface which is implementable
> using either low-level system interface, so well-written Perl programs
> should work using either mechanism. The only potential gotcha is that
> some programs might be written to rely on the specific subtle
> semantics of one implementation. However, having fcntl(2)-compatible
> locks rather than old-style flock(2) locks is (IMHO) preferable on a
> modern system.
Currently, Perl allows one to use either flock or fcntl so that one can
pick the locking mechanism that works with whatever application is also
attempting to use the lock. I think that if this proposed change were
made, we'd be left without a way to do flock, yes?
Russ Allbery (firstname.lastname@example.org) <http://www.eyrie.org/~eagle/>