bin/cat/cat.c
129
if (fcntl(STDOUT_FILENO, F_SETLKW, &stdout_lock) == -1)
bin/csh/misc.c
236
if (fcntl(nofile, F_CLOSEM, 0) == -1)
bin/dd/dd.c
103
.op_fcntl = fcntl,
bin/dd/dd_hostops.c
45
.op_fcntl = fcntl,
bin/ksh/exec.c
68
return fcntl(fd, F_SETFD, 1);
bin/ksh/io.c
316
if ((fl = fcntl(fd = name[0] - '0', F_GETFL, 0)) < 0) {
bin/ksh/misc.c
1255
if ((flags = fcntl(fd, F_GETFL, 0)) < 0)
bin/ksh/misc.c
1272
if (fcntl(fd, F_SETFL, flags) < 0)
bin/ksh/sh.h
94
#define ksh_dupbase(fd, base) fcntl(fd, F_DUPFD, base)
bin/ksh/shf.c
142
int flags = fcntl(fd, F_GETFL, 0);
bin/ksh/shf.c
89
int flags = fcntl(fd, F_GETFL, 0);
bin/sh/eval.c
160
nfd = fcntl(fds[0], F_DUPFD, 3);
bin/sh/eval.c
168
nfd = fcntl(fds[1], F_DUPFD, 3);
bin/sh/input.c
224
int flags = fcntl(0, F_GETFL, 0);
bin/sh/input.c
228
if (fcntl(0, F_SETFL, flags) >= 0) {
bin/sh/input.c
560
(void) fcntl(fd, F_SETFD, FD_CLOEXEC);
bin/sh/main.c
137
max_user_fd = fcntl(0, F_MAXFD);
bin/sh/redir.c
1085
(cloexec != -1 && fcntl(fd, F_SETFD, (fcntl_int) cloexec) == -1))
bin/sh/redir.c
1094
if (n != f && fcntl(fd, F_SETFL, (fcntl_int)n) == -1)
bin/sh/redir.c
295
if (fcntl(fd, F_SETFD, (fcntl_int)0) < 0)
bin/sh/redir.c
314
cloexec = fcntl(fd, F_GETFD);
bin/sh/redir.c
325
if ((i = fcntl(fd, F_DUPFD,
bin/sh/redir.c
334
i = fcntl(fd, F_DUPFD,
bin/sh/redir.c
339
i = fcntl(fd, F_DUPFD,
bin/sh/redir.c
352
(void)fcntl(i, F_SETFD, (fcntl_int) FD_CLOEXEC);
bin/sh/redir.c
399
(void)fcntl(f, F_SETFL,
bin/sh/redir.c
400
(fcntl_int)(fcntl(f, F_GETFL) & ~eflags));
bin/sh/redir.c
488
(void)fcntl(f, F_SETFD, (fcntl_int) FD_CLOEXEC);
bin/sh/redir.c
647
fcntl(newfd, F_SETFD,
bin/sh/redir.c
648
(fcntl_int)(fcntl(newfd, F_GETFD) | FD_CLOEXEC));
bin/sh/redir.c
713
if ((fd = fcntl(0, F_DUPFD, (fcntl_int)(i - 1))) >= 0) {
bin/sh/redir.c
744
i = fcntl(fd, F_DUPFD_CLOEXEC, (fcntl_int) big_sh_fd);
bin/sh/redir.c
763
(void)fcntl(fd, F_SETFD, (fcntl_int) FD_CLOEXEC);
bin/sh/redir.c
816
to = fcntl(fd, F_DUPFD_CLOEXEC, (fcntl_int) big_sh_fd);
bin/sh/redir.c
818
to = fcntl(fd, F_DUPFD_CLOEXEC, (fcntl_int) (big_sh_fd / 2));
bin/sh/redir.c
820
to = fcntl(fd, F_DUPFD_CLOEXEC, (fcntl_int) (fd + 1));
bin/sh/redir.c
822
to = fcntl(fd, F_DUPFD_CLOEXEC, (fcntl_int) 10);
bin/sh/redir.c
824
to = fcntl(fd, F_DUPFD_CLOEXEC, (fcntl_int) 3);
bin/sh/redir.c
87
#define CLOEXEC(fd) (fcntl((fd), F_SETFD, \
bin/sh/redir.c
88
(fcntl_int)(fcntl((fd), F_GETFD) | FD_CLOEXEC)))
bin/sh/redir.c
990
if ((c = fcntl(fd, F_GETFD)) == -1) {
bin/sh/redir.c
995
if ((f = fcntl(fd, F_GETFL)) == -1) {
common/dist/zlib/gzlib.c
256
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);
common/dist/zlib/gzlib.c
260
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | O_CLOEXEC);
crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c
604
if (fcntl(fd, F_SETFL, O_NONBLOCK) == -1)
crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c
832
if (fcntl(fd, F_SETFL, O_NONBLOCK) == -1)
crypto/dist/ipsec-tools/src/racoon/isakmp.c
1608
if (fcntl(fd, F_SETFL, O_NONBLOCK) == -1)
crypto/dist/ipsec-tools/src/racoon/misc.c
133
fcntl(fd, F_SETFD, FD_CLOEXEC);
crypto/dist/ipsec-tools/src/racoon/pfkey.c
446
if (fcntl(lcconf->sock_pfkey, F_SETFL, O_NONBLOCK) == -1)
dist/pf/usr.sbin/ftp-proxy/ftp-proxy.c
478
if ((fc = fcntl(s->server_fd, F_GETFL)) == -1 ||
dist/pf/usr.sbin/ftp-proxy/ftp-proxy.c
479
fcntl(s->server_fd, F_SETFL, fc | O_NONBLOCK) == -1) {
distrib/utils/libhack/opendir.c
71
if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1 ||
games/atc/log.c
137
flags = fcntl(score_fd, F_GETFD);
games/atc/log.c
141
if (fcntl(score_fd, F_SETFD, flags) == -1)
games/cribbage/crib.c
92
flags = fcntl(fd, F_GETFD);
games/cribbage/crib.c
96
if (fcntl(fd, F_SETFD, flags) == -1)
games/hunt/huntd/answer.c
133
flags = fcntl(newsock, F_GETFL, 0);
games/hunt/huntd/answer.c
135
(void) fcntl(newsock, F_SETFL, flags);
games/warp/term.c
132
fcntl(devtty,F_SETFL,O_NDELAY);
lib/libc/compat/sys/compat_dup3.c
53
int e = fcntl(newfd, F_GETFL, 0);
lib/libc/compat/sys/compat_dup3.c
57
e = fcntl(newfd, F_SETFL, e);
lib/libc/compat/sys/compat_dup3.c
75
return fcntl(newfd, F_SETFD, fdflags);
lib/libc/db/db/dbfile.c
106
if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
lib/libc/db/db/dbfile.c
62
if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
lib/libc/gen/closefrom.c
44
return (fcntl(fd, F_CLOSEM));
lib/libc/gen/lockf.c
72
if (fcntl(filedes, F_GETLK, &fl) == -1)
lib/libc/gen/lockf.c
85
return (fcntl(filedes, cmd, &fl));
lib/libc/gen/opendir.c
108
if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
lib/libc/gen/xsyslog.c
86
if (data->log_file == -1 || fcntl(data->log_file, F_GETFL, 0) == -1) {
lib/libc/hash/hashhl.c
53
#include <fcntl.h>
lib/libc/md/mdXhl.c
39
#include <fcntl.h>
lib/libc/net/rcmd.c
233
fcntl(s, F_SETOWN, pid);
lib/libc/resolv/res_init.c
512
statp->_u._ext.ext->resfd = fcntl(fileno(fp), F_DUPFD_CLOEXEC, 0);
lib/libc/resolv/res_send.c
704
fcntl(statp->_vcsock, F_SETFD, FD_CLOEXEC);
lib/libc/resolv/res_send.c
898
fcntl(EXT(statp)nssocks[ns], F_SETFD, FD_CLOEXEC);
lib/libc/rpc/clnt_simple.c
196
(void)fcntl(fd, F_SETFD, FD_CLOEXEC);
lib/libc/rpc/svc_vc.c
359
flags = fcntl(sock, F_GETFL, 0);
lib/libc/rpc/svc_vc.c
362
if (fcntl(sock, F_SETFL, flags | O_NONBLOCK) == -1)
lib/libc/stdio/fdopen.c
87
if ((fdflags = fcntl(fd, F_GETFL, 0)) < 0)
lib/libc/stdio/vdprintf.c
82
if ((fdflags = fcntl(fd, F_GETFL, 0)) == -1)
lib/libc/yp/yplib.c
270
if (fcntl(ysd->dom_socket, F_SETFD, FD_CLOEXEC) == -1)
lib/libedit/read.c
173
if ((e = fcntl(fd, F_GETFL, 0)) == -1)
lib/libedit/read.c
176
if (fcntl(fd, F_SETFL, e & ~O_NDELAY) == -1)
lib/libedit/readline.c
2279
if ((n = fcntl(el->el_infd, F_GETFL, 0)) < 0)
lib/libedit/readline.c
2281
if (fcntl(el->el_infd, F_SETFL, n|O_NDELAY) < 0)
lib/libedit/readline.c
2284
if (fcntl(el->el_infd, F_SETFL, n))
lib/libpam/modules/pam_ssh/pam_ssh.c
329
(void)fcntl(3, F_CLOSEM, 0);
lib/libpthread/pthread_cancelstub.c
115
__typeof(fcntl) _sys_fcntl;
lib/libpthread/pthread_cancelstub.c
794
__strong_alias(_fcntl, fcntl)
lib/libpuffs/puffs.c
551
if (fcntl(pu->pu_fd, F_GETFL) == -1) {
lib/librmt/rmtlib.c
861
return fcntl(fd, cmd, arg);
lib/librumpclient/rumpclient.c
916
FINDSYM(fcntl)
lib/librumpuser/rumpuser_sp.c
627
flags = fcntl(newfd, F_GETFL, 0);
lib/librumpuser/rumpuser_sp.c
628
if (fcntl(newfd, F_SETFL, flags | O_NONBLOCK) == -1) {
lib/libukfs/ukfs.c
418
if (fcntl(fd, F_SETLK, &flarg) == -1)
lib/libukfs/ukfs.c
477
if (fcntl(devfd, F_SETLK, &flarg) == -1) {
lib/libukfs/ukfs.c
482
if (fcntl(devfd, F_GETLK, &flarg) != 1)
lib/libutil/pidfile.c
267
if ((opts = fcntl(fd, F_GETFD)) == -1 ||
lib/libutil/pidfile.c
268
fcntl(fd, F_SETFD, opts | FD_CLOEXEC) == -1) {
lib/libutil/ttymsg.c
186
(void)fcntl(fd, F_SETFL, 0); /* clear O_NONBLOCK */
libexec/atrun/atrun.c
236
if ((fflags = fcntl(fd_in, F_GETFD)) < 0)
libexec/atrun/atrun.c
239
(void)fcntl(fd_in, F_SETFD, fflags & ~FD_CLOEXEC);
libexec/ftpd/conf.c
908
if (fcntl(fd, F_SETLK, &fl) == -1)
libexec/ftpd/conf.c
951
(void)fcntl(fd, F_SETLK, &fl);
libexec/ftpd/ftpd.c
727
if (fcntl(fileno(stdin), F_SETOWN, getpid()) == -1)
libexec/lfs_cleanerd/cleansrv.c
213
fcntl(control_socket, F_SETOWN, getpid());
libexec/lfs_cleanerd/cleansrv.c
214
flags = fcntl(control_socket, F_GETFL, NULL);
libexec/lfs_cleanerd/cleansrv.c
216
fcntl(control_socket, F_SETFL, flags);
libexec/lfs_cleanerd/lfs_cleanerd.c
436
if (fcntl(fs->clfs_ifilefd, LFCNSEGUSE, &sua) < 0) {
libexec/lfs_cleanerd/lfs_cleanerd.c
626
if (fcntl(fs->clfs_ifilefd, LFCNCLEANERINFO, cip) < 0) {
libexec/rshd/rshd.c
643
(void)fcntl(STDERR_FILENO + 1, F_CLOSEM, 0);
regress/sys/fs/lfs/ckckp/ckckp.c
63
fcntl(fd, LFCNWRAPSTOP, &dowait);
regress/sys/fs/lfs/ckckp/ckckp.c
92
fcntl(fd, LFCNWRAPGO, &dowait);
regress/sys/kern/select/select.c
193
if (fcntl(fds[i][0], F_SETFL, O_NONBLOCK) == -1) {
sbin/dump_lfs/lfs_inode.c
419
fcntl(root_fd, LFCNREWIND, -1); /* Ignore return value */
sbin/dump_lfs/lfs_inode.c
420
if (fcntl(root_fd, LFCNWRAPSTOP, &waitfor) < 0) {
sbin/dump_lfs/lfs_inode.c
441
fcntl(root_fd, LFCNWRAPGO, &waitfor);
sbin/efi/utils.c
414
if ((fd_flags = fcntl(fd, F_GETFL)) == -1)
sbin/efi/utils.c
417
if (fcntl(fd, F_SETFL, O_NONBLOCK | fd_flags) == -1)
sbin/efi/utils.c
466
fcntl(fd, F_SETFL, fd_flags);
sbin/fsck_lfs/kernelops.c
73
.ko_fcntl = fcntl,
sbin/resize_lfs/resize_lfs.c
155
if (fcntl(rootfd, LFCNINVAL, &i) == 0)
sbin/resize_lfs/resize_lfs.c
165
if (fcntl(rootfd, LFCNRESIZE, &newnsegs) == -1) {
sbin/routed/main.c
301
if (fcntl(rt_sock, F_SETFL, O_NONBLOCK) == -1)
sbin/routed/main.c
610
if (fcntl(sock, F_SETFL, O_NONBLOCK) == -1)
sys/arch/usermode/usermode/thunk.c
1068
flags = fcntl(fd, F_GETFL, 0);
sys/arch/usermode/usermode/thunk.c
1071
if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) {
sys/arch/usermode/usermode/thunk.c
1373
flags = fcntl(rfb->clientfd, F_GETFL, 0);
sys/arch/usermode/usermode/thunk.c
1374
fcntl(rfb->clientfd, F_SETFL, flags | O_ASYNC);
sys/arch/usermode/usermode/thunk.c
1375
error = fcntl(rfb->clientfd, F_SETOWN, getpid());
sys/arch/usermode/usermode/thunk.c
451
flags = fcntl(STDIN_FILENO, F_GETFL, 0);
sys/arch/usermode/usermode/thunk.c
458
return fcntl(STDIN_FILENO, F_SETFL, flags);
sys/arch/usermode/usermode/thunk.c
831
return fcntl(fd, F_SETOWN, getpid());
sys/rump/librump/rumpkern/rump_syscalls.c
1335
__weak_alias(fcntl,rump___sysimpl_fcntl);
sys/sys/fcntl.h
344
int fcntl(int, int, ...);
tests/compat/linux/h_inotify_init.c
48
REQUIRE(fcntl(fd, LINUX_F_GETFD) == 0);
tests/compat/linux/h_inotify_init.c
49
REQUIRE((fcntl(fd, LINUX_F_GETFL) & LINUX_O_NONBLOCK) == 0);
tests/compat/linux/h_inotify_init.c
54
REQUIRE(fcntl(fd, LINUX_F_GETFD) == 0);
tests/compat/linux/h_inotify_init.c
55
REQUIRE((fcntl(fd, LINUX_F_GETFL) & LINUX_O_NONBLOCK) != 0);
tests/compat/linux/h_inotify_init.c
60
REQUIRE(fcntl(fd, LINUX_F_GETFD) != 0);
tests/compat/linux/h_inotify_init.c
61
REQUIRE((fcntl(fd, LINUX_F_GETFL) & LINUX_O_NONBLOCK) == 0);
tests/dev/audio/audiotest.c
497
r = fcntl(fd, cmd);
tests/kernel/h_cloexec.c
43
if (fcntl(fd, F_GETFL, &flags) == 0)
tests/kernel/h_fexecve.c
46
if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
tests/kernel/t_cloexec.c
120
RL(fd = fcntl(STDIN_FILENO, F_DUPFD_CLOEXEC, 0));
tests/kernel/t_cloexec.c
151
RL(fcntl(fd, F_SETFD, FD_CLOEXEC));
tests/kernel/t_clofork.c
121
RL(fd = fcntl(STDIN_FILENO, F_DUPFD_CLOFORK, 0));
tests/kernel/t_clofork.c
152
RL(fcntl(fd, F_SETFD, FD_CLOFORK));
tests/kernel/t_epoll.c
76
ATF_REQUIRE_MSG((fcntl(fd, F_GETFD) & FD_CLOEXEC) == 0,
tests/kernel/t_epoll.c
80
ATF_REQUIRE_MSG((fcntl(fd, F_GETFD) & FD_CLOEXEC) != 0,
tests/kernel/t_fcntl.c
115
rv = fcntl(fd, F_GETPATH, path);
tests/kernel/t_fcntl.c
69
rv = fcntl(fd, F_GETPATH, path);
tests/kernel/t_lockf.c
102
(void)fcntl(fd, F_SETLKW, &fl);
tests/kernel/t_memfd_create.c
224
ATF_REQUIRE_EQ_MSG(fcntl(fd, F_ADD_SEALS, F_SEAL_WRITE), -1,
tests/kernel/t_memfd_create.c
241
RL(fcntl(fd, F_ADD_SEALS, F_SEAL_SEAL));
tests/kernel/t_memfd_create.c
243
ATF_REQUIRE_EQ_MSG(fcntl(fd, F_ADD_SEALS, F_SEAL_WRITE), -1,
tests/kernel/t_memfd_create.c
267
rv = fcntl(fd, F_ADD_SEALS, F_SEAL_SEAL);
tests/kernel/t_memfd_create.c
335
RL(fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK));
tests/kernel/t_memfd_create.c
359
RL(fcntl(fd, F_ADD_SEALS, F_SEAL_GROW));
tests/kernel/t_memfd_create.c
383
RL(fcntl(fd, F_ADD_SEALS, F_SEAL_WRITE));
tests/kernel/t_memfd_create.c
415
ATF_REQUIRE_EQ_MSG(fcntl(fd, F_ADD_SEALS, F_SEAL_WRITE), -1,
tests/kernel/t_memfd_create.c
435
RL(fcntl(fd, F_ADD_SEALS, F_SEAL_FUTURE_WRITE));
tests/kernel/t_memfd_create.c
467
RL(fcntl(fd, F_ADD_SEALS, F_SEAL_FUTURE_WRITE));
tests/kernel/t_pty.c
180
if ((opt = fcntl(fd, F_GETFL, NULL)) == -1)
tests/kernel/t_pty.c
182
if (fcntl(fd, F_SETFL, opt | O_NONBLOCK) == -1)
tests/lib/libc/gen/t_closefrom.c
101
cur = fcntl(0, F_MAXFD);
tests/lib/libc/gen/t_closefrom.c
107
cur = fcntl(0, F_MAXFD);
tests/lib/libc/gen/t_closefrom.c
151
_exit(fcntl(0, F_MAXFD));
tests/lib/libc/gen/t_closefrom.c
59
cur1 = fcntl(0, F_MAXFD);
tests/lib/libc/gen/t_closefrom.c
64
cur2 = fcntl(0, F_MAXFD);
tests/lib/libc/gen/t_closefrom.c
93
cur = fcntl(0, F_MAXFD);
tests/lib/libc/sys/t_eventfd.c
792
ATF_REQUIRE((fcntl(efd, F_GETFL) & O_NONBLOCK) == 0);
tests/lib/libc/sys/t_eventfd.c
793
ATF_REQUIRE(fcntl(efd, F_SETFL, O_NONBLOCK) == 0);
tests/lib/libc/sys/t_eventfd.c
794
ATF_REQUIRE((fcntl(efd, F_GETFL) & O_NONBLOCK) != 0);
tests/lib/libc/sys/t_eventfd.c
795
ATF_REQUIRE((fcntl(efd, F_GETFD) & FD_CLOEXEC) == 0);
tests/lib/libc/sys/t_eventfd.c
807
ATF_REQUIRE((fcntl(efd, F_GETFL) & ~O_ACCMODE) == O_NONBLOCK);
tests/lib/libc/sys/t_eventfd.c
808
ATF_REQUIRE((fcntl(efd, F_GETFD) & FD_CLOEXEC) != 0);
tests/lib/libc/sys/t_eventfd.c
809
ATF_REQUIRE(fcntl(efd, F_SETFD, 0) == 0);
tests/lib/libc/sys/t_eventfd.c
810
ATF_REQUIRE((fcntl(efd, F_GETFD) & FD_CLOEXEC) == 0);
tests/lib/libc/sys/t_eventfd.c
811
ATF_REQUIRE(fcntl(efd, F_SETFD, FD_CLOEXEC) == 0);
tests/lib/libc/sys/t_eventfd.c
812
ATF_REQUIRE((fcntl(efd, F_GETFD) & FD_CLOEXEC) != 0);
tests/lib/libc/sys/t_mmap.c
128
if (fcntl(fds[0], F_SETFL, O_NONBLOCK) != 0)
tests/lib/libc/sys/t_pipe2.c
100
ATF_REQUIRE(fcntl(fd[1], F_GETNOSIGPIPE) == 0);
tests/lib/libc/sys/t_pipe2.c
72
ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) != 0);
tests/lib/libc/sys/t_pipe2.c
73
ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) != 0);
tests/lib/libc/sys/t_pipe2.c
75
ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) == 0);
tests/lib/libc/sys/t_pipe2.c
76
ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) == 0);
tests/lib/libc/sys/t_pipe2.c
80
ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOFORK) != 0);
tests/lib/libc/sys/t_pipe2.c
81
ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOFORK) != 0);
tests/lib/libc/sys/t_pipe2.c
83
ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOFORK) == 0);
tests/lib/libc/sys/t_pipe2.c
84
ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOFORK) == 0);
tests/lib/libc/sys/t_pipe2.c
88
ATF_REQUIRE((fcntl(fd[0], F_GETFL) & O_NONBLOCK) != 0);
tests/lib/libc/sys/t_pipe2.c
89
ATF_REQUIRE((fcntl(fd[1], F_GETFL) & O_NONBLOCK) != 0);
tests/lib/libc/sys/t_pipe2.c
91
ATF_REQUIRE((fcntl(fd[0], F_GETFL) & O_NONBLOCK) == 0);
tests/lib/libc/sys/t_pipe2.c
92
ATF_REQUIRE((fcntl(fd[1], F_GETFL) & O_NONBLOCK) == 0);
tests/lib/libc/sys/t_pipe2.c
96
ATF_REQUIRE(fcntl(fd[0], F_GETNOSIGPIPE) != 0);
tests/lib/libc/sys/t_pipe2.c
97
ATF_REQUIRE(fcntl(fd[1], F_GETNOSIGPIPE) != 0);
tests/lib/libc/sys/t_pipe2.c
99
ATF_REQUIRE(fcntl(fd[0], F_GETNOSIGPIPE) == 0);
tests/lib/libc/sys/t_poll.c
509
RL(flags = fcntl(writefd, F_GETFL));
tests/lib/libc/sys/t_poll.c
510
RL(fcntl(writefd, F_SETFL, flags|O_NONBLOCK));
tests/lib/libc/sys/t_poll.c
514
RL(fcntl(writefd, F_SETFL, flags));
tests/lib/libc/sys/t_poll.c
526
RL(flags = fcntl(writefd, F_GETFL));
tests/lib/libc/sys/t_poll.c
527
RL(fcntl(writefd, F_SETFL, flags|O_NONBLOCK));
tests/lib/libc/sys/t_poll.c
534
RL(fcntl(writefd, F_SETFL, flags));
tests/lib/libc/sys/t_poll.c
544
RL(flags = fcntl(readfd, F_GETFL));
tests/lib/libc/sys/t_poll.c
545
RL(fcntl(readfd, F_SETFL, flags|O_NONBLOCK));
tests/lib/libc/sys/t_poll.c
550
RL(fcntl(readfd, F_SETFL, flags));
tests/lib/libc/sys/t_select.c
227
if (fcntl(fd, F_GETFL) != -1 || errno != EBADF)
tests/lib/libc/sys/t_socketpair.c
100
ATF_REQUIRE((fcntl(fd[0], F_GETFL) & O_NONBLOCK) != 0);
tests/lib/libc/sys/t_socketpair.c
101
ATF_REQUIRE((fcntl(fd[1], F_GETFL) & O_NONBLOCK) != 0);
tests/lib/libc/sys/t_socketpair.c
103
ATF_REQUIRE((fcntl(fd[0], F_GETFL) & O_NONBLOCK) == 0);
tests/lib/libc/sys/t_socketpair.c
104
ATF_REQUIRE((fcntl(fd[1], F_GETFL) & O_NONBLOCK) == 0);
tests/lib/libc/sys/t_socketpair.c
84
ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) != 0);
tests/lib/libc/sys/t_socketpair.c
85
ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) != 0);
tests/lib/libc/sys/t_socketpair.c
87
ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) == 0);
tests/lib/libc/sys/t_socketpair.c
88
ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) == 0);
tests/lib/libc/sys/t_socketpair.c
92
ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOFORK) != 0);
tests/lib/libc/sys/t_socketpair.c
93
ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOFORK) != 0);
tests/lib/libc/sys/t_socketpair.c
95
ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOFORK) == 0);
tests/lib/libc/sys/t_socketpair.c
96
ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOFORK) == 0);
tests/lib/libc/sys/t_stat.c
341
flags = fcntl(fd, F_GETFL);
tests/lib/libc/sys/t_stat.c
344
ATF_REQUIRE(fcntl(fd, F_SETFL, flags | O_NONBLOCK) != -1);
tests/lib/libc/sys/t_timerfd.c
772
ATF_REQUIRE((fcntl(tfd, F_GETFL) & O_NONBLOCK) == 0);
tests/lib/libc/sys/t_timerfd.c
773
ATF_REQUIRE(fcntl(tfd, F_SETFL, O_NONBLOCK) == 0);
tests/lib/libc/sys/t_timerfd.c
774
ATF_REQUIRE((fcntl(tfd, F_GETFL) & O_NONBLOCK) != 0);
tests/lib/libc/sys/t_timerfd.c
775
ATF_REQUIRE((fcntl(tfd, F_GETFD) & FD_CLOEXEC) == 0);
tests/lib/libc/sys/t_timerfd.c
787
ATF_REQUIRE((fcntl(tfd, F_GETFL) & ~O_ACCMODE) == O_NONBLOCK);
tests/lib/libc/sys/t_timerfd.c
788
ATF_REQUIRE((fcntl(tfd, F_GETFD) & FD_CLOEXEC) != 0);
tests/lib/libc/sys/t_timerfd.c
789
ATF_REQUIRE(fcntl(tfd, F_SETFD, 0) == 0);
tests/lib/libc/sys/t_timerfd.c
790
ATF_REQUIRE((fcntl(tfd, F_GETFD) & FD_CLOEXEC) == 0);
tests/lib/libc/sys/t_timerfd.c
791
ATF_REQUIRE(fcntl(tfd, F_SETFD, FD_CLOEXEC) == 0);
tests/lib/libc/sys/t_timerfd.c
792
ATF_REQUIRE((fcntl(tfd, F_GETFD) & FD_CLOEXEC) != 0);
tests/lib/libc/ttyio/t_ptm.c
187
ATF_CHECK_EQ(O_RDWR|O_NONBLOCK, fcntl(fdm, F_GETFL));
tests/lib/libc/ttyio/t_ptm.c
188
ATF_CHECK_EQ(FD_CLOEXEC|FD_CLOFORK, fcntl(fdm, F_GETFD));
tests/lib/libcurses/director/director.c
275
fcntl(master, F_SETFL, O_NONBLOCK);
tests/lib/libpthread/t_cancellation.c
271
RL(fcntl(fd, F_SETLKW, &fl));
tests/lib/libpthread/t_cancellation.c
288
RL(fcntl(fd, F_OFD_SETLKW, &fl));
tests/lib/librumphijack/h_client.c
132
if (fcntl(0, F_MAXFD) != 7)
tests/modules/t_kcov.c
68
} while (fcntl(fd2, F_GETFL) != -1 || errno != EBADF);
tests/net/net/t_tcp.c
190
fl = fcntl(srvr, F_GETFL, 0);
tests/net/net/t_tcp.c
194
ok = fcntl(srvr, F_SETFL, fl & ~O_NONBLOCK);
tests/net/net/t_tcp.c
227
fl = fcntl(acpt, F_GETFL, 0);
tests/net/net/t_tcp.c
234
ok = fcntl(acpt, F_SETFL, fl & ~O_NONBLOCK);
tests/net/net/t_tcp.c
238
fl = fcntl(acpt, F_GETFL, 0);
tools/compat/flock.c
68
rc = fcntl(fd, op & LOCK_NB ? F_SETLK : F_SETLKW, &fl);
usr.bin/at/at.c
229
(void)fcntl(lockdes, F_SETLKW, &lock);
usr.bin/at/at.c
275
(void)fcntl(lockdes, F_SETLKW, &lock);
usr.bin/bthset/bthset.c
478
if (fcntl(mx, F_SETFL, O_ASYNC) < 0)
usr.bin/chpass/chpass.c
228
if (dfd < 0 || fcntl(dfd, F_SETFD, 1) < 0)
usr.bin/chpass/chpass.c
273
if (fcntl(tfd, F_SETFD, 1) < 0)
usr.bin/chpass/chpass.c
277
if (pfd < 0 || fcntl(pfd, F_SETFD, 1) < 0)
usr.bin/ftp/ftp.c
1745
if ((flags = fcntl(data, F_GETFL, 0)) == -1)
usr.bin/ftp/ftp.c
1747
if (fcntl(data, F_SETFL, flags | O_NONBLOCK) == -1)
usr.bin/ftp/ftp.c
1789
if (fcntl(data, F_SETFL, flags) == -1) /* restore socket flags */
usr.bin/ftp/ssl.c
270
fcntl(sd, F_SETFD, FD_CLOEXEC);
usr.bin/ftp/ssl.c
649
if ((flags = fcntl(sock, F_GETFL, 0)) == -1) {
usr.bin/ftp/ssl.c
655
if (fcntl(sock, F_SETFL, flags | O_NONBLOCK) == -1) {
usr.bin/ftp/ssl.c
707
if (fcntl(sock, F_SETFL, flags) == -1) {
usr.bin/ftp/util.c
1380
if ((flags = fcntl(sock, F_GETFL, 0)) == -1) {
usr.bin/ftp/util.c
1386
if (fcntl(sock, F_SETFL, flags | O_NONBLOCK) == -1) {
usr.bin/ftp/util.c
1451
if (fcntl(sock, F_SETFL, flags) == -1) {
usr.bin/ktrace/ktrace.c
274
int oflag = fcntl(fd, F_GETFL, 0);
usr.bin/ktrace/ktrace.c
278
if (fcntl(fd, F_SETFL, oflag & ~flag) == -1)
usr.bin/login/login.c
260
(void)fcntl(3, F_CLOSEM, 0);
usr.bin/login/login_pam.c
200
(void)fcntl(3, F_CLOSEM, 0);
usr.bin/mail/lex.c
100
maxfd = fcntl(0, F_MAXFD);
usr.bin/mail/lex.c
139
fcntl(0, F_MAXFD));
usr.bin/make/job.c
1581
if (fcntl(STDIN_FILENO, F_SETFD, 0) == -1)
usr.bin/make/job.c
1588
if (fcntl(tokenPoolJob.inPipe, F_SETFD, 0) == -1)
usr.bin/make/job.c
1591
if (fcntl(tokenPoolJob.outPipe, F_SETFD, 0) == -1)
usr.bin/make/job.c
1605
if (fcntl(STDOUT_FILENO, F_SETFD, 0) == -1)
usr.bin/make/job.c
1714
(void)fcntl(fd, F_SETFD, FD_CLOEXEC);
usr.bin/make/job.c
2645
(void)fcntl(tokenPoolReader, F_SETFD, FD_CLOEXEC);
usr.bin/make/job.c
2646
(void)fcntl(tokenPoolWriter, F_SETFD, FD_CLOEXEC);
usr.bin/make/job.c
628
int flags = fcntl(fd, F_GETFL, 0);
usr.bin/make/job.c
632
if (fcntl(fd, F_SETFL, flags) == -1)
usr.bin/make/job.c
639
if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
usr.bin/make/job.c
654
int fd = fcntl(pipe_fds[i], F_DUPFD, minfd);
usr.bin/make/main.c
390
if (fcntl(tokenPoolReader, F_GETFD, 0) < 0 ||
usr.bin/make/main.c
391
fcntl(tokenPoolWriter, F_GETFD, 0) < 0) {
usr.bin/make/meta.c
147
(void)fcntl(dupfd, F_SETFD, FD_CLOEXEC);
usr.bin/make/meta.c
152
(void)fcntl(pbm->mon_fd, F_SETFD, FD_CLOEXEC);
usr.bin/make/meta.c
1758
(void)fcntl(childPipe[0], F_SETFD, FD_CLOEXEC);
usr.bin/make/meta.c
1759
(void)fcntl(childPipe[1], F_SETFD, FD_CLOEXEC);
usr.bin/rlogin/rlogin.c
678
(void)fcntl(rem, F_SETOWN, pid);
usr.bin/tip/tip.c
265
((fcarg = fcntl(FD, F_GETFL, 0)) < 0 ||
usr.bin/tip/tip.c
266
fcntl(FD, F_SETFL, fcarg & ~O_NONBLOCK) < 0)) {
usr.bin/xinstall/xinstall.c
1267
if (fcntl(fileno(metafp), F_SETLKW, &metalog_lock) == -1) {
usr.bin/xinstall/xinstall.c
1310
if (fcntl(fileno(metafp), F_SETLKW, &metalog_lock) == -1) {
usr.sbin/faithd/tcp.c
208
(void)fcntl(s_snd, F_SETFD, O_NONBLOCK);
usr.sbin/inetd/inetd.c
630
if (fcntl(ctrl, F_SETFD, 0) < 0)
usr.sbin/inetd/inetd.c
793
if (fcntl(sep->se_fd, F_SETFD, FD_CLOEXEC) < 0) {
usr.sbin/ldpd/ldp_peer.c
191
sopts = fcntl(p->socket, F_GETFL);
usr.sbin/ldpd/ldp_peer.c
194
fcntl(p->socket, F_SETFL, &sopts);
usr.sbin/mmcformat/uscsi_subr.c
251
flags = fcntl(disc->fhandle, F_GETFL);
usr.sbin/mmcformat/uscsi_subr.c
253
fcntl(disc->fhandle, F_SETFL, flags);
usr.sbin/perfused/perfused.c
278
if ((flags = fcntl(fd, F_GETFL, 0)) == -1)
usr.sbin/perfused/perfused.c
280
if (fcntl(fd, F_SETFL, flags|O_NONBLOCK) != 0)
usr.sbin/powerd/powerd_hostops.c
47
.op_fcntl = fcntl,
usr.sbin/powerd/prog_ops.h
69
#define prog_fcntl fcntl
usr.sbin/syslogd/syslogd.c
4275
if (fcntl(pfd[1], F_SETFL, O_NONBLOCK) == -1) {
usr.sbin/syslogd/tls.c
1065
if ((fcntl(sock, F_SETFL, O_NONBLOCK)) == -1) {
usr.sbin/syslogd/tls.c
1410
if ((fcntl(newsock, F_SETFL, O_NONBLOCK)) == -1) {
usr.sbin/timed/timedc/timedc.c
74
fcntl(3, F_CLOSEM);
usr.sbin/tpctl/main.c
394
if ((flg = fcntl(fd, F_GETFL)) == -1)
usr.sbin/tpctl/main.c
396
if (fcntl(fd, F_SETFL, flg | O_NONBLOCK) == -1)
usr.sbin/tpctl/main.c
400
fcntl(fd, F_SETFL, flg);
usr.sbin/tpctl/tp.c
76
flags = fcntl(tp->fd, F_GETFL);
usr.sbin/tpctl/tp.c
80
if (fcntl(tp->fd, F_SETFL, flags) < 0)
usr.sbin/ypbind/ypbind.c
994
(void)fcntl(rpcsock, F_SETFL, fcntl(rpcsock, F_GETFL, 0) | FNDELAY);
usr.sbin/ypbind/ypbind.c
995
(void)fcntl(pingsock, F_SETFL, fcntl(pingsock, F_GETFL, 0) | FNDELAY);