]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Improve comments about lock breaking
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 24 Aug 2016 17:56:28 +0000 (19:56 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 27 Aug 2016 08:08:14 +0000 (10:08 +0200)
lockfile.c

index 39e757501007846d1e056323962c45040e6e621f..ce3dcf4aaa38d854d0b3287d8ae7ee1f4cc56ef6 100644 (file)
@@ -149,9 +149,10 @@ lockfile_acquire(const char *path, unsigned staleness_limit)
                        if (str_eq(content, initial_content)) {
                                // The lock seems to be stale -- break it.
                                cc_log("lockfile_acquire: breaking %s", lockfile);
+                               // Try to acquire path.lock.lock:
                                if (lockfile_acquire(lockfile, staleness_limit)) {
-                                       lockfile_release(path);
-                                       lockfile_release(lockfile);
+                                       lockfile_release(path); // Remove path.lock
+                                       lockfile_release(lockfile); // Remove path.lock.lock
                                        to_sleep = 1000;
                                        slept = 0;
                                        continue;