Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Open the lock files close-on-exec
Each exec filter and snapshot compressor a fill runs inherited the slot's lock descriptor beside the stdout it writes into. An flock lasts until its last copy closes and nothing waits for a process a filter leaves behind, so a fill killed before its rename could leave the slot locked, and served stale or uncached, for as long as such a process lived. The scan holds its lock across no exec and opens the same way so that the two stay alike.
-rw-r--r--source/cache.c4
-rw-r--r--source/cgit.c2
-rwxr-xr-xtests/t0003-cache.sh27
3 files changed, 31 insertions, 2 deletions