Searched refs:lockfd (Results 1 – 5 of 5) sorted by relevance
| /freebsd-14.2/usr.bin/lockf/ |
| H A D | lockf.c | 59 static int lockfd = -1; variable 210 lockfd = acquire_lock(&subj, flags | O_NONBLOCK, silent); in main() 211 while (lockfd == -1 && !timed_out && waitsec != 0) { in main() 213 lockfd = acquire_lock(&subj, flags, silent); in main() 216 lockfd = acquire_lock(&subj, flags | O_NONBLOCK, in main() 222 if (lockfd == -1) { /* We failed to acquire the lock. */ in main() 241 close(lockfd); in main() 299 flock(lockfd, LOCK_UN); in cleanup()
|
| /freebsd-14.2/tools/test/stress2/lib/ |
| H A D | resources.c | 49 static int lockfd; variable 166 if ((lockfd = open(lockpath, in getdf() 176 if (lockfd != -1) in getdf() 182 if (lockfd == -1) in getdf() 245 close(lockfd); in reservedf()
|
| /freebsd-14.2/lib/libutil/ |
| H A D | pw_util.c | 69 static int lockfd = -1; variable 178 lockfd = flopen(masterpasswd, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0); in pw_lock() 179 if (lockfd == -1) { in pw_lock() 192 if (fstat(lockfd, &st) == -1) in pw_lock() 196 close(lockfd); in pw_lock() 197 lockfd = -1; in pw_lock() 199 return (lockfd); in pw_lock() 372 if (lockfd != -1) in pw_fini() 373 close(lockfd); in pw_fini()
|
| H A D | gr_util.c | 47 static int lockfd = -1; variable 104 lockfd = flopen(group_file, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0); in gr_lock() 105 if (lockfd == -1) { in gr_lock() 112 if (fstat(lockfd, &st) == -1) in gr_lock() 116 close(lockfd); in gr_lock() 117 lockfd = -1; in gr_lock() 119 return (lockfd); in gr_lock() 372 if (lockfd != -1) in gr_fini() 373 close(lockfd); in gr_fini()
|
| /freebsd-14.2/crypto/openssh/ |
| H A D | sshkey-xmss.c | 72 int lockfd; /* locked in sshkey_xmss_get_state() */ member 127 state->lockfd = -1; in sshkey_xmss_init() 451 int lockfd = -1, have_state = 0, have_ostate, tries = 0; in sshkey_xmss_get_state() local 483 while (flock(lockfd, LOCK_EX|LOCK_NB) == -1) { in sshkey_xmss_get_state() 521 state->lockfd = lockfd; in sshkey_xmss_get_state() 523 lockfd = -1; in sshkey_xmss_get_state() 526 if (lockfd != -1) in sshkey_xmss_get_state() 527 close(lockfd); in sshkey_xmss_get_state() 663 if (state->lockfd != -1) { in sshkey_xmss_update_state() 664 close(state->lockfd); in sshkey_xmss_update_state() [all …]
|