]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Correctly lock stats file for reading
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 21 Feb 2010 20:01:02 +0000 (21:01 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 21 Feb 2010 20:01:02 +0000 (21:01 +0100)
stats.c

diff --git a/stats.c b/stats.c
index 9114484127f0a8fca1320c64ba017a987e2a7999..645bfa476375600635082745a37dcc6f1e5bfea9 100644 (file)
--- a/stats.c
+++ b/stats.c
@@ -213,7 +213,7 @@ void stats_read(const char *stats_file, unsigned counters[STATS_END])
                stats_default(counters);
                return;
        }
-       write_lock_fd(fd);
+       read_lock_fd(fd);
        stats_read_fd(fd, counters);
        close(fd);
 }