]> Sergey Matveev's repositories - public-inbox.git/commit
init: implement locking
authorEric Wong <e@80x24.org>
Thu, 3 Oct 2019 07:21:59 +0000 (07:21 +0000)
committerEric Wong <e@80x24.org>
Sat, 5 Oct 2019 06:54:00 +0000 (06:54 +0000)
commit6242da34fbe20940e3e258d2ec80e9aeef0438e1
treec35bca08f9bf8f193debfd6f80902f640457abd6
parent0e323a88eee90196392ef9a86bcd38159023550f
init: implement locking

First, we use flock(2) to wait on parallel public-inbox-init(1)
invocations while we make multiple changes using git-config(1).
This flock allows -init processes to wait on each other if using
reasonable POSIX filesystems.

Then, we also need a git-config(1)-compatible lock to prevent
user-invoked git-config(1) processes from clobbering our
changes while we're holding the flock.
script/public-inbox-init
t/init.t