fully atomic LOCPATH populating
authorJoey Hess <joeyh@joeyh.name>
Mon, 5 Oct 2020 18:17:46 +0000 (14:17 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 5 Oct 2020 18:17:46 +0000 (14:17 -0400)
commitd74d9789688fde1151ece6a751d1c549af87de84
tree19c59840a3657637b3c242eea95fab097d3f7309
parent12a248f823fe6e278ed3336fa6834958b1f8e321
fully atomic LOCPATH populating

This fixes a race between two runshells from two different
bundles. One could have run the cache cleanup code, seen the
LOCPATH the other one was in the process of populating, which didn't
have a base or a buildid file written yet, and so the cache cleanup code
would delete it out from under the other process.

Also, doing it fully atomically simplifies where the races between two
runshell processes from the same bundle. Now that needs to be
dealt with to only the mv that puts it in place.

Note that, if the same bundle has 2 runshells run first thing, they will
both generate locales, which is unncessary work, but that should be a
very unusual circumstance and after the LOCPATH is set up, it won't
happen again anyway.
standalone/linux/skel/runshell