F_SETLKW
if (fcntl(STDOUT_FILENO, F_SETLKW, &stdout_lock) != 0)
ret = fcntl(fd, F_SETLKW, &l);
ret = fcntl(fd, F_SETLKW, &l);
cmd = F_SETLKW; /* Blocking */
int lock_cmd = F_SETLKW;
#if defined(HAVE_FCNTL_H) && defined(F_SETLKW) && defined(F_RDLCK)
assert(cmd == F_SETLKW || cmd == F_SETLK);
ofdcmd = (cmd == F_SETLKW) ? F_OFD_SETLKW : F_OFD_SETLK;
#if defined(F_SETLK) && defined(F_SETLKW)
rc = fcntl(fd, op & LOCK_NB ? F_SETLK : F_SETLKW, &fl);
cmd = F_SETLKW;
case F_SETLKW:
if (cmd == F_OSETLKW || cmd == F_SETLKW) {
case F_SETLKW:
return (kern_fcntl(td, args->fd, F_SETLKW,
return (kern_fcntl(td, args->fd, F_SETLKW,
newcmd = F_SETLKW;
case F_SETLKW:
case F_SETLKW:
res = fcntl(fd, F_SETLKW, &fl);
res = fcntl(fd, F_SETLKW, &fl);
if (fcntl(fd, F_SETLKW, &fl) < 0) {
error = fcntl(tc->tc_fd, F_SETLKW, &tc->tc_fl);
res = fcntl(fd, F_SETLKW, &fl);
if (fcntl(fd, F_SETLKW, &fl) < 0)
res = fcntl(fd, F_SETLKW, &fl);
if (fcntl(fd, F_SETLKW, &fl) < 0)
res = fcntl(fd, F_SETLKW, &fl);
ATF_REQUIRE_ERRNO(EBADF, fcntl(pathfd, F_SETLKW, &flk) == -1);
ATF_REQUIRE_ERRNO(EBADF, fcntl(pathfd, F_SETLKW, &flk) == -1);
ASSERT_NE(-1, fcntl(fd, F_SETLKW, &fl)) << strerror(errno);
ASSERT_NE(-1, fcntl(fd, F_SETLKW, &fl)) << strerror(errno);
fcntl(lockdes, F_SETLKW, &lock);
fcntl(lockdes, F_SETLKW, &lock);
if (fcntl(fileno(metafp), F_SETLKW, &metalog_lock) == -1) {
if (fcntl(fileno(metafp), F_SETLKW, &metalog_lock) == -1)