commit e8f803b5e0a1ec1775733d64e72d9e9e9b5a9026 from: Stefan Sperling via: Thomas Adam date: Sun Jun 25 17:34:21 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 - b95d1cf6b000a7750270aced50dba0807da41467 commit + e8f803b5e0a1ec1775733d64e72d9e9e9b5a9026 blob - d793ba0ecff70de035bafaeda51106600264190c blob + 2188fe6a5bf5fa0a9fe92257bc1b318c7ff5de32 --- lib/lockfile.c +++ lib/lockfile.c @@ -73,8 +73,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);