Searched refs:lockfd (Results 1 – 4 of 4) sorted by relevance
| /freebsd-13.1/usr.bin/lockf/ |
| H A D | lockf.c | 51 static int lockfd = -1; variable 130 lockfd = acquire_lock(lockname, flags | O_NONBLOCK); in main() 131 while (lockfd == -1 && !timed_out && waitsec != 0) { in main() 133 lockfd = acquire_lock(lockname, flags); in main() 136 lockfd = acquire_lock(lockname, flags | O_NONBLOCK); in main() 141 if (lockfd == -1) { /* We failed to acquire the lock. */ in main() 152 close(lockfd); in main() 195 flock(lockfd, LOCK_UN); in cleanup()
|
| /freebsd-13.1/lib/libutil/ |
| H A D | gr_util.c | 49 static int lockfd = -1; variable 106 lockfd = flopen(group_file, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0); in gr_lock() 107 if (lockfd == -1) { in gr_lock() 114 if (fstat(lockfd, &st) == -1) in gr_lock() 118 close(lockfd); in gr_lock() 119 lockfd = -1; in gr_lock() 121 return (lockfd); in gr_lock() 374 if (lockfd != -1) in gr_fini() 375 close(lockfd); in gr_fini()
|
| H A D | pw_util.c | 70 static int lockfd = -1; variable 179 lockfd = flopen(masterpasswd, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0); in pw_lock() 180 if (lockfd == -1) { in pw_lock() 193 if (fstat(lockfd, &st) == -1) in pw_lock() 197 close(lockfd); in pw_lock() 198 lockfd = -1; in pw_lock() 200 return (lockfd); in pw_lock() 373 if (lockfd != -1) in pw_fini() 374 close(lockfd); in pw_fini()
|
| /freebsd-13.1/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 …]
|