commit ce3526e665af1bf37976bad5db91e63a4892b685 from: Stefan Sperling date: Fri Jun 23 13:50:09 2023 UTC show the path of a lock file when locking it fails before: gotadmin: lockfile timeout after: gotadmin: gc.pid.lock: lockfile timeout commit - c8af7691c98d6cd5864e6c2b62642c6c3e3ca086 commit + ce3526e665af1bf37976bad5db91e63a4892b685 blob - e5276a2237daae080959cb6cfda569fa291cddbe blob + 0af419be5282778934e8a5369c5793756c35ecd3 --- lib/lockfile.c +++ lib/lockfile.c @@ -71,8 +71,10 @@ got_lockfile_lock(struct got_lockfile **lf, const char sleep(1); } while (--attempts > 0); - if ((*lf)->fd == -1) - err = got_error(GOT_ERR_LOCKFILE_TIMEOUT); + if ((*lf)->fd == -1) { + err = got_error_fmt(GOT_ERR_LOCKFILE_TIMEOUT, + "%s", (*lf)->path); + } done: if (err) { got_lockfile_unlock(*lf, dir_fd);