Symbol: fcntl
bin/sh/input.c
170
int flags = fcntl(0, F_GETFL, 0);
bin/sh/input.c
173
if (fcntl(0, F_SETFL, flags) >= 0) {
bin/sh/input.c
373
fd2 = fcntl(fd, F_DUPFD_CLOEXEC_MAYBE, 10);
bin/sh/input.c
393
fcntl(fd, F_SETFD, FD_CLOEXEC);
bin/sh/jobs.c
193
(ttyfd = fcntl(i, F_DUPFD_CLOEXEC_MAYBE, 10)) < 0) {
bin/sh/jobs.c
203
if ((i = fcntl(ttyfd, F_DUPFD_CLOEXEC_MAYBE, 10)) < 0) {
bin/sh/jobs.c
211
if (fcntl(ttyfd, F_SETFD, FD_CLOEXEC) < 0) {
bin/sh/redir.c
146
if ((i = fcntl(fd, F_DUPFD_CLOEXEC_MAYBE, 10)) == -1) {
bin/sh/redir.c
159
fcntl(i, F_SETFD, FD_CLOEXEC);
bin/sh/redir.c
285
flags = fcntl(pip[1], F_GETFL, 0);
bin/sh/redir.c
286
if (flags != -1 && fcntl(pip[1], F_SETFL, flags | O_NONBLOCK) != -1) {
bin/sh/redir.c
292
fcntl(pip[1], F_SETFL, flags);
bin/sh/show.c
405
if ((flags = fcntl(fileno(tracefile), F_GETFL, 0)) >= 0)
bin/sh/show.c
406
fcntl(fileno(tracefile), F_SETFL, flags | O_APPEND);
crypto/libressl/crypto/bio/b_posix.c
84
int flags = fcntl(s, F_GETFD);
crypto/libressl/crypto/bio/b_posix.c
86
return (fcntl(s, F_SETFL, flags | O_NONBLOCK) != -1);
crypto/libressl/crypto/bio/b_posix.c
88
return (fcntl(s, F_SETFL, flags & ~O_NONBLOCK) != -1);
crypto/openssh/authfd.c
103
if (fcntl(sock, F_SETFD, FD_CLOEXEC) == -1 ||
crypto/openssh/channels.c
423
(void)fcntl(rfd, F_SETFD, FD_CLOEXEC);
crypto/openssh/channels.c
425
(void)fcntl(wfd, F_SETFD, FD_CLOEXEC);
crypto/openssh/channels.c
427
(void)fcntl(efd, F_SETFD, FD_CLOEXEC);
crypto/openssh/channels.c
452
(val = fcntl(rfd, F_GETFL)) != -1 && !(val & O_NONBLOCK)) {
crypto/openssh/channels.c
458
(val = fcntl(wfd, F_GETFL)) != -1 && !(val & O_NONBLOCK)) {
crypto/openssh/channels.c
464
(val = fcntl(efd, F_GETFL)) != -1 && !(val & O_NONBLOCK)) {
crypto/openssh/channels.c
554
(void)fcntl(*fdp, F_SETFL, c->restore_flags[0]);
crypto/openssh/channels.c
557
(void)fcntl(*fdp, F_SETFL, c->restore_flags[1]);
crypto/openssh/channels.c
560
(void)fcntl(*fdp, F_SETFL, c->restore_flags[2]);
crypto/openssh/misc.c
116
val = fcntl(fd, F_GETFL);
crypto/openssh/misc.c
127
if (fcntl(fd, F_SETFL, val) == -1) {
crypto/openssh/misc.c
140
val = fcntl(fd, F_GETFL);
crypto/openssh/misc.c
151
if (fcntl(fd, F_SETFL, val) == -1) {
crypto/openssh/misc.c
1521
if (fcntl(dupfd, F_GETFL) == -1 && errno == EBADF) {
crypto/openssh/monitor.c
1790
if (fcntl(x, F_SETFD, FD_CLOEXEC) == -1) \
crypto/openssh/sshconnect.c
367
(void)fcntl(sock, F_SETFD, FD_CLOEXEC);
crypto/openssh/sshconnect2.c
2058
if (fcntl(sock, F_SETFD, 0) == -1) /* keep the socket on exec */
crypto/openssh/sshd-session.c
1209
fcntl(sock_out, F_SETFD, FD_CLOEXEC);
crypto/openssh/sshd-session.c
1210
fcntl(sock_in, F_SETFD, FD_CLOEXEC);
crypto/openssh/sshd.c
771
if (fcntl(listen_sock, F_SETFD, FD_CLOEXEC) == -1) {
games/atc/log.c
117
flags = fcntl(score_fd, F_GETFD);
games/atc/log.c
121
if (fcntl(score_fd, F_SETFD, flags) == -1)
games/hunt/huntd/answer.c
115
flags = fcntl(newsock, F_GETFL, 0);
games/hunt/huntd/answer.c
117
fcntl(newsock, F_SETFL, flags);
games/hunt/huntd/driver.c
1022
flags = fcntl(s, F_GETFL, 0);
games/hunt/huntd/driver.c
1024
fcntl(s, F_SETFL, flags);
games/morse/morse.c
433
lflags = fcntl(line, F_GETFL);
games/morse/morse.c
435
fcntl(line, F_SETFL, &lflags);
lib/libc/sysvipc/sockets.c
113
flags = fcntl(sock, F_GETFL, 0);
lib/libc/sysvipc/sockets.c
114
fcntl(sock, F_SETFL, flags & ~O_NONBLOCK);
lib/libc/sysvipc/sockets.c
96
flags = fcntl(fd, F_GETFL, 0);
lib/libc/sysvipc/sockets.c
97
fcntl(fd, F_SETFL, flags & ~O_NONBLOCK);
lib/libdmsg/msg.c
145
fcntl(iocom->wakeupfds[0], F_SETFL, O_NONBLOCK);
lib/libdmsg/msg.c
146
fcntl(iocom->wakeupfds[1], F_SETFL, O_NONBLOCK);
lib/libdmsg/msg.c
163
fcntl(sock_fd, F_SETFL, O_NONBLOCK);
lib/libdmsg/msg.c
167
fcntl(alt_fd, F_SETFL, O_NONBLOCK);
lib/libfetch/common.c
286
flags = fcntl(sd, F_GETFD);
lib/libfetch/common.c
288
(void)fcntl(sd, F_SETFD, flags | FD_CLOEXEC);
lib/libkvm/kvm.c
187
if (fcntl(kd->pmfd, F_SETFD, FD_CLOEXEC) < 0) {
lib/libkvm/kvm.c
205
if (fcntl(kd->vmfd, F_SETFD, FD_CLOEXEC) < 0) {
lib/libkvm/kvm.c
220
if (fcntl(kd->nlfd, F_SETFD, FD_CLOEXEC) < 0) {
lib/libthread_xu/thread/thr_syscalls.c
281
__strong_reference(__fcntl, fcntl);
lib/libusb/libusb10.c
105
flags = fcntl(f, F_GETFL, NULL);
lib/libusb/libusb10.c
109
fcntl(f, F_SETFL, flags);
libexec/atrun/atrun.c
215
if ((fflags = fcntl(fd_in, F_GETFD)) <0)
libexec/atrun/atrun.c
218
fcntl(fd_in, F_SETFD, fflags & ~FD_CLOEXEC);
libexec/ftpd/ftpd.c
1892
if ((flags = fcntl(pdata, F_GETFL, 0)) == -1 ||
libexec/ftpd/ftpd.c
1893
fcntl(pdata, F_SETFL, flags | O_NONBLOCK) == -1)
libexec/ftpd/ftpd.c
1904
if ((flags = fcntl(pdata, F_GETFL, 0)) == -1 ||
libexec/ftpd/ftpd.c
1905
fcntl(pdata, F_SETFL, flags & ~O_NONBLOCK) == -1)
libexec/ftpd/ftpd.c
568
if (fcntl(fileno(stdin), F_SETOWN, getpid()) == -1)
libexec/rtld-elf/rtld.c
2186
fd = fcntl(fd_u, F_DUPFD_CLOEXEC, 0);
sbin/devd/devd.cc
841
if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0)
sbin/hammer2/cmd_debug.c
105
fcntl(0, F_SETFL, O_NONBLOCK);
sbin/newfs/newfs.c
709
if (fcntl(STDERR_FILENO, F_GETFL) < 0) {
sbin/routed/main.c
282
if (fcntl(rt_sock, F_SETFL, O_NONBLOCK) == -1)
sbin/routed/main.c
576
if (fcntl(sock, F_SETFL, O_NONBLOCK) == -1)
sbin/slattach/slattach.c
283
if ((oflags = fcntl(fd, F_GETFL)) == -1) {
sbin/slattach/slattach.c
287
if (fcntl(fd, F_SETFL, oflags & ~O_NONBLOCK) == -1) {
sbin/udevd/udevd_socket.c
114
flags = fcntl(s, F_GETFL, 0);
sbin/udevd/udevd_socket.c
115
ret = fcntl(s, F_SETFL, flags | O_NONBLOCK);
sbin/udevd/udevd_socket.c
124
flags = fcntl(s, F_GETFL, 0);
sbin/udevd/udevd_socket.c
125
ret = fcntl(s, F_SETFL, flags & ~O_NONBLOCK);
sys/platform/vkernel64/platform/init.c
1147
fcntl(net_fd, F_SETFL, O_NONBLOCK);
sys/platform/vkernel64/platform/kqueue.c
84
if (fcntl(KQueueFd, F_SETOWN, getpid()) < 0)
sys/platform/vkernel64/platform/kqueue.c
86
if (fcntl(KQueueFd, F_SETFL, O_ASYNC) < 0)
sys/sys/fcntl.h
347
int fcntl(int, int, ...);
sys/sys/sysunion.h
86
struct fcntl_args fcntl;
test/bsd/dup_test/dup_test.c
113
if (fcntl(fd2, F_GETFD) != 0)
test/bsd/dup_test/dup_test.c
160
if (fcntl(fd2, F_GETFD) == 0)
test/bsd/dup_test/dup_test.c
166
if ((fd2 = fcntl(fd1, F_DUPFD, 10)) < 0)
test/bsd/dup_test/dup_test.c
176
if (fcntl(fd2, F_GETFD) != 0)
test/bsd/dup_test/dup_test.c
192
if ((fd2 = fcntl(fd1, F_DUP2FD, fd1 + 1)) < 0)
test/bsd/dup_test/dup_test.c
208
if (fcntl(fd2, F_GETFD) != 0)
test/bsd/dup_test/dup_test.c
217
if ((fd2 = fcntl(fd1, F_DUP2FD, fd1)) < 0)
test/bsd/dup_test/dup_test.c
234
if (fcntl(fd2, F_GETFD) == 0)
test/bsd/dup_test/dup_test.c
244
if ((fd2 = fcntl(fd1, F_DUP2FD, rlp.rlim_cur + 1)) >= 0)
test/bsd/dup_test/dup_test.c
252
if ((fd2 = fcntl(fd1, F_DUPFD_CLOEXEC, 10)) < 0)
test/bsd/dup_test/dup_test.c
262
if (fcntl(fd2, F_GETFD) != 1)
test/bsd/dup_test/dup_test.c
271
if ((fd2 = fcntl(fd1, F_DUP2FD_CLOEXEC, fd1 + 1)) < 0)
test/bsd/dup_test/dup_test.c
287
if (fcntl(fd2, F_GETFD) != FD_CLOEXEC)
test/bsd/dup_test/dup_test.c
303
if ((fd2 = fcntl(fd1, F_DUP2FD_CLOEXEC, rlp.rlim_cur + 1)) >= 0)
test/bsd/dup_test/dup_test.c
327
if (fcntl(fd2, F_GETFD) != FD_CLOEXEC)
test/bsd/dup_test/dup_test.c
352
if (fcntl(fd2, F_GETFD) != 0)
test/bsd/dup_test/dup_test.c
386
if ((fd2 = fcntl(fd1, F_DUPFD_CLOFORK, 10)) < 0)
test/bsd/dup_test/dup_test.c
396
if (fcntl(fd2, F_GETFD) != FD_CLOFORK)
test/bsd/dup_test/dup_test.c
421
if (fcntl(fd2, F_GETFD) != FD_CLOFORK)
test/bsd/dup_test/dup_test.c
446
if (fcntl(fd2, F_GETFD) != 0)
test/bsd/dup_test/dup_test.c
95
if (fcntl(fd1, F_SETFD, 1) != 0)
test/debug/fdpassing.c
34
fcntl(fds[0], F_SETFL, 0);
test/debug/fdpassing.c
35
fcntl(fds[1], F_SETFL, 0);
test/debug/posixlock.c
105
if (fcntl(fd, F_SETLKW, &lk) == 0) {
test/debug/posixlock.c
113
if (fcntl(fd, F_SETLKW, &lk) == 0) {
test/debug/posixlock.c
74
while ((r = fcntl(fd, F_GETLK, &lk)) == 0) {
test/debug/posixlock.c
97
if (fcntl(fd, F_SETLKW, &lk) == 0) {
test/illumos/oclo/oclo.c
137
int flags = fcntl(rt->crt_fd, F_GETFD, NULL);
test/illumos/oclo/oclo.c
251
if (fcntl(fd, F_SETFD, targ_flags) < 0) {
test/illumos/oclo/oclo.c
298
dup = fcntl(fd, cmd, fd);
test/illumos/oclo/oclo.c
303
dup = fcntl(fd, cmd, fd + 1);
test/illumos/oclo/oclo.c
306
dup = fcntl(fd, cmd | (targ_flags << F_DUP3FD_SHIFT), fd + 1);
test/illumos/oclo/oclo_errors.c
71
int fd = fcntl(STDERR_FILENO, F_DUP3FD | (flags << F_DUP3FD_SHIFT), 23);
test/illumos/oclo/ocloexec_verify.c
42
max = fcntl(0, F_MAXFD);
test/illumos/oclo/ocloexec_verify.c
53
int flags = fcntl(fd, F_GETFD, NULL);
test/lockf/lockf.c
117
ret = fcntl(fd, F_SETLKW, &fl);
test/stress/fsstress/fsstress.c
1705
flags = fcntl(fd, F_GETFL, 0);
test/stress/fsstress/fsstress.c
1709
if (fcntl(fd, F_SETFL, flags|O_DIRECT) < 0) {
usr.bin/at/at.c
258
fcntl(lockdes, F_SETLKW, &lock);
usr.bin/at/at.c
308
fcntl(lockdes, F_SETLKW, &lock);
usr.bin/chat/chat.c
1036
if ((status = fcntl(0, F_GETFL, 0)) == -1)
usr.bin/chat/chat.c
1039
if (fcntl(0, F_SETFL, status & ~O_NONBLOCK) == -1)
usr.bin/chat/chat.c
1064
if ((status = fcntl(0, F_GETFL, 0)) == -1)
usr.bin/chat/chat.c
1067
if (fcntl(0, F_SETFL, status & ~O_NONBLOCK) == -1)
usr.bin/chat/chat.c
443
if ((flags = fcntl(0, F_GETFL, 0)) == -1)
usr.bin/chat/chat.c
446
if (fcntl(0, F_SETFL, flags | O_NONBLOCK) == -1)
usr.bin/dsynth/build.c
1541
fcntl(3, F_SETFD, 0);
usr.bin/dsynth/build.c
2611
fcntl(MasterPtyFd, F_SETFL, O_NONBLOCK);
usr.bin/mail/lex.c
129
fcntl(fileno(otf), F_SETFD, 1);
usr.bin/mail/lex.c
132
fcntl(fileno(itf), F_SETFD, 1);
usr.bin/mail/names.c
325
fcntl(image, F_SETFD, 1);
usr.bin/mail/popen.c
104
fcntl(p[READ], F_SETFD, 1);
usr.bin/mail/popen.c
105
fcntl(p[WRITE], F_SETFD, 1);
usr.bin/mail/popen.c
69
fcntl(fileno(fp), F_SETFD, 1);
usr.bin/mail/popen.c
81
fcntl(fileno(fp), F_SETFD, 1);
usr.bin/truss/setup.c
85
fcntl(fd, F_SETFD, FD_CLOEXEC);
usr.bin/vknet/vknet.c
336
fcntl(tap_fd, F_SETFL, 0);
usr.bin/wall/ttymsg.c
142
(void) fcntl(fd, F_SETFL, 0); /* clear O_NONBLOCK */
usr.bin/window/compress.c
306
(void) fcntl(fileno(cc_trace_fp), F_SETFD, 1);
usr.bin/window/context.c
94
(void) fcntl(fileno(cx.x_fp), F_SETFD, 1);
usr.bin/window/wwopen.c
107
(void) fcntl(d[0], F_SETFD, 1);
usr.bin/window/wwopen.c
108
(void) fcntl(d[1], F_SETFD, 1);
usr.bin/window/wwpty.c
56
(void) fcntl(w->ww_pty, F_SETFD, 1);
usr.sbin/cron/lib/misc.c
262
fcntl(fd, F_SETFD, 1);
usr.sbin/cron/lib/misc.c
453
fcntl(LogFD, F_SETFD, 1);
usr.sbin/dconschat/dconschat.c
585
flags = fcntl(ns, F_GETFL, 0);
usr.sbin/dconschat/dconschat.c
587
fcntl(ns, F_SETFL, flags);
usr.sbin/dntpd/socket.c
71
if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) {
usr.sbin/ftp-proxy/ftp-proxy.c
507
if ((fc = fcntl(s->server_fd, F_GETFL)) == -1 ||
usr.sbin/ftp-proxy/ftp-proxy.c
508
fcntl(s->server_fd, F_SETFL, fc | O_NONBLOCK) == -1) {
usr.sbin/inetd/inetd.c
1172
if (fcntl(sep->se_fd, F_SETFD, FD_CLOEXEC) < 0) {
usr.sbin/inetd/inetd.c
724
if (fcntl(ctrl, F_SETFD, 0) < 0) {
usr.sbin/lpr/lpd/lpd.c
279
fcntl(lfd, F_SETFL, 0); /* turn off non-blocking mode */
usr.sbin/lpr/lpd/printjob.c
194
if (fcntl(lfd, F_SETFL, 0) < 0) {
usr.sbin/nscd/nscd.c
198
fcntl(retval->sockfd, F_SETFL, O_NONBLOCK);
usr.sbin/nscd/nscdcli.c
201
fcntl(client_socket, F_SETFL, O_NONBLOCK);
usr.sbin/ppp/chap.c
315
fcntl(fd, F_SETFD, 1);
usr.sbin/ppp/chat.c
744
fcntl(i, F_SETFD, 1);
usr.sbin/ppp/command.c
644
fcntl(i, F_SETFD, 1);
usr.sbin/ppp/exec.c
122
stat = fcntl(fids[0], F_GETFL, 0);
usr.sbin/ppp/exec.c
125
fcntl(fids[0], F_SETFL, stat);
usr.sbin/ppp/exec.c
183
fcntl(i, F_SETFD, 1);
usr.sbin/ppp/prompt.c
421
stat = fcntl(fd, F_GETFL, 0);
usr.sbin/ppp/prompt.c
424
fcntl(fd, F_SETFL, stat);
usr.sbin/ppp/prompt.c
460
stat = fcntl(p->fd_in, F_GETFL, 0);
usr.sbin/ppp/prompt.c
463
fcntl(p->fd_in, F_SETFL, stat);
usr.sbin/ppp/prompt.c
480
stat = fcntl(p->fd_in, F_GETFL, 0);
usr.sbin/ppp/prompt.c
483
fcntl(p->fd_in, F_SETFL, stat);
usr.sbin/ppp/prompt.c
493
stat = fcntl(p->fd_in, F_GETFL, 0);
usr.sbin/ppp/prompt.c
496
fcntl(p->fd_in, F_SETFL, stat);
usr.sbin/ppp/tty.c
473
oldflag = fcntl(p->fd, F_GETFL, 0);
usr.sbin/ppp/tty.c
476
fcntl(p->fd, F_SETFL, oldflag | O_NONBLOCK);
usr.sbin/ppp/tty.c
518
if ((oldflag = fcntl(p->fd, F_GETFL, 0)) != -1)
usr.sbin/ppp/tty.c
519
fcntl(p->fd, F_SETFL, oldflag & ~O_NONBLOCK);
usr.sbin/ppp/tty.c
747
oldflag = fcntl(p->fd, F_GETFL, 0);
usr.sbin/ppp/tty.c
759
fcntl(p->fd, F_SETFL, oldflag & ~O_NONBLOCK);
usr.sbin/rtadvd/control.c
239
if ((flags = fcntl(fd, F_GETFL, 0)) == -1) {
usr.sbin/rtadvd/control.c
244
if ((flags = fcntl(fd, F_SETFL, flags | O_NONBLOCK)) == -1) {
usr.sbin/rtadvd/control.c
323
if ((flags = fcntl(s->si_fd, F_GETFL, 0)) == -1) {
usr.sbin/rtadvd/control.c
328
if ((flags = fcntl(s->si_fd, F_SETFL, flags | O_NONBLOCK)) == -1) {
usr.sbin/syslogd/syslogd.c
2536
if (fcntl(pfd[1], F_SETFL, O_NONBLOCK) == -1) {
usr.sbin/syslogd/syslogd.c
558
if (fcntl(fklog, F_SETFL, O_NONBLOCK) < 0)
usr.sbin/vknetd/vknetd.c
236
fcntl(tap_fd, F_SETFL, 0);
usr.sbin/ypserv/yp_dnslookup.c
139
if (fcntl(resfd, F_SETFL, O_NONBLOCK) == -1) {