Searched refs:lockfd (Results 1 - 5 of 5) sorted by relevance
/freebsd-10.1-release/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-10.1-release/usr.bin/csup/ |
H A D | main.c | 111 int family, error, lockfd, lflag, overridemask; local 120 lockfd = 0; 193 lockfd = open(lockfile, 195 if (lockfd != -1) { 196 error = flock(lockfd, LOCK_EX | LOCK_NB); 198 if (lockfd != -1) 199 close(lockfd); 205 if (lockfd == -1 || error == -1) { 206 if (lockfd != -1) 207 close(lockfd); [all...] |
/freebsd-10.1-release/usr.bin/lockf/ |
H A D | lockf.c | 49 static int lockfd = -1; variable 125 lockfd = acquire_lock(lockname, flags | O_NONBLOCK); 126 while (lockfd == -1 && !timed_out && waitsec != 0) { 128 lockfd = acquire_lock(lockname, flags); 131 lockfd = acquire_lock(lockname, flags | O_NONBLOCK); 136 if (lockfd == -1) { /* We failed to acquire the lock. */ 147 close(lockfd); 188 flock(lockfd, LOCK_UN);
|
/freebsd-10.1-release/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); 336 if (lockfd != -1) 337 close(lockfd);
|
H A D | pw_util.c | 73 static int lockfd = -1; variable 182 lockfd = flopen(masterpasswd, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0); 183 if (lockfd == -1) { 196 if (fstat(lockfd, &st) == -1) 200 close(lockfd); 201 lockfd = -1; 203 return (lockfd); 373 if (lockfd != -1) 374 close(lockfd);
|
Completed in 110 milliseconds