Searched refs:lockfd (Results 1 - 4 of 4) sorted by relevance
/freebsd-11-stable/release/picobsd/tinyware/passwd/ |
H A D | pw_util.c | 68 static int lockfd; variable 127 lockfd = open(masterpasswd, O_RDONLY, 0); 128 if (lockfd < 0 || fcntl(lockfd, F_SETFD, 1) == -1) 130 if (flock(lockfd, LOCK_EX|LOCK_NB)) 138 if (fstat(lockfd, &st) < 0) 142 close(lockfd); 143 lockfd = -1; 145 return (lockfd);
|
/freebsd-11-stable/usr.bin/lockf/ |
H A D | lockf.c | 51 static int lockfd = -1; variable 127 lockfd = acquire_lock(lockname, flags | O_NONBLOCK); 128 while (lockfd == -1 && !timed_out && waitsec != 0) { 130 lockfd = acquire_lock(lockname, flags); 133 lockfd = acquire_lock(lockname, flags | O_NONBLOCK); 138 if (lockfd == -1) { /* We failed to acquire the lock. */ 149 close(lockfd); 192 flock(lockfd, LOCK_UN);
|
/freebsd-11-stable/lib/libutil/ |
H A D | gr_util.c | 47 static int lockfd = -1; variable 104 lockfd = flopen(group_file, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0); 105 if (lockfd == -1) { 112 if (fstat(lockfd, &st) == -1) 116 close(lockfd); 117 lockfd = -1; 119 return (lockfd); 372 if (lockfd != -1) 373 close(lockfd);
|
H A D | pw_util.c | 72 static int lockfd = -1; variable 181 lockfd = flopen(masterpasswd, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0); 182 if (lockfd == -1) { 195 if (fstat(lockfd, &st) == -1) 199 close(lockfd); 200 lockfd = -1; 202 return (lockfd); 372 if (lockfd != -1) 373 close(lockfd);
|
Completed in 84 milliseconds