[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automake's file locking (was Re: Autoconf/Automake is not using vers

From: Bob Friesenhahn
Subject: Re: Automake's file locking (was Re: Autoconf/Automake is not using version from AC_INIT)
Date: Mon, 25 Jan 2021 10:18:00 -0600 (CST)
User-agent: Alpine 2.20 (GSO 67 2015-01-07)

On Mon, 25 Jan 2021, Zack Weinberg wrote:

Automake "just" calls Perl's 'flock' built-in (see 'sub lock' in
Automake/ (this code is copied into Autoconf under the
Autom4te:: namespace).  It would be relatively straightforward to
teach it to try 'fcntl(F_SETLKW, ...)' if that fails.  Do you know
whether that would be sufficient?  If not, we may be up a creek, since
depending on CPAN modules is a non-starter.

I expect that it would be that "simple" except for of course everything involved with making sure that things are working properly for everyone.

It may be that moving forward to 'fcntl(F_SETLKW, ...)' by default and then falling back to legacy 'flock' would be best. Or perhaps discarding use of legacy 'flock' entirely.

Most likely the decision as to what to do was based on what was the oldest primitive supported at the time. The GNU/Linux manual page says that "the flock() call first appeared in 4.2BSD". It also says "Since Linux 2.6.12, NFS clients support flock() locks by emulating them as fcntl(2) byte-range locks on the entire file.". There are a number of warnings in the manual page regarding the danger of mixing locking primitives. It was never intended that flock() work over a network share.

It seems unlikely that Autotools development is going to be done on a system lacking POSIX locking since such a system would not be considered a usable system for most purposes. If a project does not provide a 'maintainer mode' to stop maintainer rules from firing, then this could impact archaic targets from the early '90s.

Bob Friesenhahn,
GraphicsMagick Maintainer,
Public Key,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]