Searched refs:fd_lock (Results 1 – 1 of 1) sorted by relevance
33 static int fd_lock = -1; variable565 if (fd_lock >= 0) in acquire_lock()572 fd_lock = open(lockfile, O_WRONLY|O_CREAT, S_IWUSR); in acquire_lock()573 if (fd_lock < 0) { in acquire_lock()577 if (fcntl(fd_lock, F_SETFD, FD_CLOEXEC) < 0) { in acquire_lock()578 close(fd_lock); in acquire_lock()583 rc = fcntl(fd_lock, F_SETLKW, &fl); in acquire_lock()600 if (fd_lock < 0) in release_lock()609 rc = fcntl(fd_lock, F_SETLKW, &fl); in release_lock()617 close(fd_lock); in release_lock()[all …]
Completed in 4 milliseconds