diff options
Diffstat (limited to 'source/cgit.c')
| -rw-r--r-- | source/cgit.c | 7 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 6 insertions, 1 deletion
diff --git a/source/cgit.c b/source/cgit.c index 42325a0..37b07d7 100644 --- a/source/cgit.c +++ b/source/cgit.c @@ -366,8 +366,13 @@ static int generate_cached_repolist(const char *path, const char *cached_rc) } if (fcntl(fd, F_SETLK, &lock) < 0) { // A lock held elsewhere only means concurrent requests, which - // is not worth a line in the server log. + // is not worth a line in the server log. Any other failure, a + // filesystem without lock support say, silently costs a scan + // on every request and does deserve one. err = errno; + if (err != EACCES && err != EAGAIN) + fprintf(stderr, "[cgit] Error locking %s: %s (%d)\n", + locked_rc.buf, strerror(err), err); close(fd); goto out; } |
