Gitweb - Add flocks to deal with binary data writes and reads
commitb1ab8b5d1748b0174fb7014651f0f91de3b4c05a
authorJohn 'Warthog9' Hawley <warthog9@eaglescrag.net>
Fri, 24 Sep 2010 00:40:05 +0000 (23 17:40 -0700)
committerJohn 'Warthog9' Hawley <warthog9@eaglescrag.net>
Fri, 24 Sep 2010 00:40:05 +0000 (23 17:40 -0700)
tree700ee33c27fed38c58d5d072f04ef8cedc29e2ba
parent1e647e0f10f5517065d22772059ddf4cd91f8828
Gitweb - Add flocks to deal with binary data writes and reads

There was a race condition where a downloading process could have
the file that it was reading from changed or zeroed out from
underneath it.  This adds a new locking constraint, and an
intermediate write file for the binary file.

This will write the resulting file into a new file, which will than
wait for an exclusive lock to come up before it gets moved into place.

Testing so far shows this works as expected.
gitweb/cache.pm