xbps_repo_lock: sleep() for a second if the lock is already taken.
... rather than looping continuously.
This commit is contained in:
parent
60c8bd7fef
commit
92c07c126f
@ -102,7 +102,8 @@ xbps_repo_lock(struct xbps_handle *xhp, const char *repodir,
|
||||
return false;
|
||||
} else {
|
||||
xbps_dbg_printf(xhp, "[repo] `%s' lock file exists,"
|
||||
"waiting...\n", lockfile);
|
||||
"waiting for 1s...\n", lockfile);
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
*lockfname = lockfile;
|
||||
|
Loading…
Reference in New Issue
Block a user