core/dynamic-user: flock() does not return EBUSY

This commit is contained in:
Mike Yuan
2026-01-03 21:14:32 +01:00
parent 08c3010399
commit 776dc1b9d5
+1 -1
View File
@@ -240,7 +240,7 @@ static int pick_uid(char **suggested_paths, const char *name, uid_t *ret_uid) {
r = flock(lock_fd, LOCK_EX|LOCK_NB); /* Try to get a BSD file lock on the UID lock file */
if (r < 0) {
if (IN_SET(errno, EBUSY, EAGAIN))
if (errno == EAGAIN)
goto next; /* already in use */
return -errno;