| /freebsd-10-stable/tools/regression/capsicum/syscalls/ |
| D | cap_fcntls_limit.c | 56 CHECK(fcntl(fd, F_GETFD) == 0); in fcntl_tests_0() 57 CHECK(fcntl(fd, F_SETFD, FD_CLOEXEC) == 0); in fcntl_tests_0() 58 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in fcntl_tests_0() 59 CHECK(fcntl(fd, F_SETFD, 0) == 0); in fcntl_tests_0() 60 CHECK(fcntl(fd, F_GETFD) == 0); in fcntl_tests_0() 62 CHECK(fcntl(fd, F_GETFL) == O_RDWR); in fcntl_tests_0() 63 CHECK(fcntl(fd, F_SETFL, O_NONBLOCK) == 0); in fcntl_tests_0() 64 CHECK(fcntl(fd, F_GETFL) == (O_RDWR | O_NONBLOCK)); in fcntl_tests_0() 65 CHECK(fcntl(fd, F_SETFL, 0) == 0); in fcntl_tests_0() 66 CHECK(fcntl(fd, F_GETFL) == O_RDWR); in fcntl_tests_0() [all …]
|
| D | cap_ioctls_limit.c | 56 CHECK(fcntl(fd, F_GETFD) == 0); in ioctl_tests_0() 58 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in ioctl_tests_0() 60 CHECK(fcntl(fd, F_GETFD) == 0); in ioctl_tests_0() 77 CHECK(fcntl(fd, F_GETFD) == 0); in ioctl_tests_0() 79 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in ioctl_tests_0() 81 CHECK(fcntl(fd, F_GETFD) == 0); in ioctl_tests_0() 97 CHECK(fcntl(fd, F_GETFD) == 0); in ioctl_tests_0() 99 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in ioctl_tests_0() 103 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in ioctl_tests_0() 104 CHECK(fcntl(fd, F_SETFD, 0) == 0); in ioctl_tests_0() [all …]
|
| /freebsd-10-stable/tests/sys/file/ |
| D | dup_test.c | 95 if (fcntl(fd1, F_SETFD, 1) != 0) in main() 113 if (fcntl(fd2, F_GETFD) != 0) in main() 160 if (fcntl(fd2, F_GETFD) == 0) in main() 166 if ((fd2 = fcntl(fd1, F_DUPFD, 10)) < 0) in main() 176 if (fcntl(fd2, F_GETFD) != 0) in main() 192 if ((fd2 = fcntl(fd1, F_DUP2FD, fd1 + 1)) < 0) in main() 208 if (fcntl(fd2, F_GETFD) != 0) in main() 217 if ((fd2 = fcntl(fd1, F_DUP2FD, fd1)) < 0) in main() 234 if (fcntl(fd2, F_GETFD) == 0) in main() 244 if ((fd2 = fcntl(fd1, F_DUP2FD, rlp.rlim_cur + 1)) >= 0) in main() [all …]
|
| D | flock_helper.c | 158 if (fcntl(fd, F_GETLK, &fl1) < 0) in test1() 211 if (fcntl(fd, F_SETLK, &fl) < 0) in test2() 231 res = fcntl(fd, F_SETLK, &fl); in test2() 282 if (fcntl(fd, F_SETLK, &fl) < 0) in test3() 305 res = fcntl(fd, F_SETLKW, &fl); in test3() 351 if (fcntl(fd, F_SETLK, &fl) < 0) in test4() 370 if (fcntl(fd, F_GETLK, &fl) < 0) in test4() 426 if (fcntl(fd, F_SETLK, &fl) < 0) in test5() 439 if (fcntl(fd, F_SETLK, &fl) < 0) in test5() 442 if (fcntl(fd, F_SETLKW, &fl) < 0) in test5() [all …]
|
| D | fcntlflags_test.c | 55 flags1 = fcntl(fd, F_GETFL); in subtests() 65 if (fcntl(fd, F_SETFL, flags1) == -1) in subtests() 71 flags2 = fcntl(fd, F_GETFL); in subtests() 81 if (fcntl(fd, F_SETFL, flags2 | O_NONBLOCK) == -1) in subtests() 87 flags3 = fcntl(fd, F_GETFL); in subtests()
|
| /freebsd-10-stable/contrib/netbsd-tests/lib/libc/sys/ |
| D | t_pipe2.c | 69 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) != 0); in run() 70 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) != 0); in run() 72 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) == 0); in run() 73 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) == 0); in run() 77 ATF_REQUIRE((fcntl(fd[0], F_GETFL) & O_NONBLOCK) != 0); in run() 78 ATF_REQUIRE((fcntl(fd[1], F_GETFL) & O_NONBLOCK) != 0); in run() 80 ATF_REQUIRE((fcntl(fd[0], F_GETFL) & O_NONBLOCK) == 0); in run() 81 ATF_REQUIRE((fcntl(fd[1], F_GETFL) & O_NONBLOCK) == 0); in run() 86 ATF_REQUIRE(fcntl(fd[0], F_GETNOSIGPIPE) != 0); in run() 87 ATF_REQUIRE(fcntl(fd[1], F_GETNOSIGPIPE) != 0); in run() [all …]
|
| D | t_socketpair.c | 81 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) != 0); in run() 82 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) != 0); in run() 84 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) == 0); in run() 85 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) == 0); in run() 89 ATF_REQUIRE((fcntl(fd[0], F_GETFL) & O_NONBLOCK) != 0); in run() 90 ATF_REQUIRE((fcntl(fd[1], F_GETFL) & O_NONBLOCK) != 0); in run() 92 ATF_REQUIRE((fcntl(fd[0], F_GETFL) & O_NONBLOCK) == 0); in run() 93 ATF_REQUIRE((fcntl(fd[1], F_GETFL) & O_NONBLOCK) == 0); in run()
|
| /freebsd-10-stable/usr.bin/make/ |
| D | proc.c | 93 fcntl(STDIN_FILENO, F_SETFD, in Proc_Exec() 94 fcntl(STDIN_FILENO, F_GETFD) & (~FD_CLOEXEC)); in Proc_Exec() 95 fcntl(STDOUT_FILENO, F_SETFD, in Proc_Exec() 96 fcntl(STDOUT_FILENO, F_GETFD) & (~FD_CLOEXEC)); in Proc_Exec() 97 fcntl(STDERR_FILENO, F_SETFD, in Proc_Exec() 98 fcntl(STDERR_FILENO, F_GETFD) & (~FD_CLOEXEC)); in Proc_Exec()
|
| /freebsd-10-stable/contrib/netbsd-tests/lib/libc/gen/ |
| D | t_closefrom.c | 59 cur1 = fcntl(0, F_MAXFD); in ATF_TC_BODY() 64 cur2 = fcntl(0, F_MAXFD); in ATF_TC_BODY() 93 cur = fcntl(0, F_MAXFD); in ATF_TC_BODY() 101 cur = fcntl(0, F_MAXFD); in ATF_TC_BODY() 107 cur = fcntl(0, F_MAXFD); in ATF_TC_BODY() 151 _exit(fcntl(0, F_MAXFD)); in ATF_TC_BODY()
|
| /freebsd-10-stable/contrib/gdb/gdb/ |
| D | inflow.c | 124 tflags_ours = fcntl (0, F_GETFL, 0); in gdb_has_a_terminal() 236 result = fcntl (0, F_SETFL, tflags_inferior); in terminal_inferior() 237 result = fcntl (0, F_SETFL, tflags_inferior); in terminal_inferior() 404 tflags_inferior = fcntl (0, F_GETFL, 0); in terminal_ours_1() 409 result = fcntl (0, F_SETFL, tflags_ours); in terminal_ours_1() 410 result = fcntl (0, F_SETFL, tflags_ours); in terminal_ours_1() 665 fcntl (target_activity_fd, F_SETOWN, getpid ()); in set_sigio_trap() 666 old_fcntl_flags = fcntl (target_activity_fd, F_GETFL, 0); in set_sigio_trap() 667 fcntl (target_activity_fd, F_SETFL, old_fcntl_flags | FASYNC); in set_sigio_trap() 677 fcntl (target_activity_fd, F_SETFL, old_fcntl_flags); in clear_sigio_trap()
|
| /freebsd-10-stable/tools/regression/sockets/kqueue/ |
| D | kqueue.c | 272 if (fcntl(sv[0], F_SETFL, O_NONBLOCK) != 0) in main() 275 if (fcntl(sv[1], F_SETFL, O_NONBLOCK) != 0) in main() 302 if (fcntl(sv[0], F_SETFL, O_NONBLOCK) != 0) in main() 304 if (fcntl(sv[1], F_SETFL, O_NONBLOCK) != 0) in main() 323 if (fcntl(sv[0], F_SETFL, O_NONBLOCK) != 0) in main() 326 if (fcntl(sv[1], F_SETFL, O_NONBLOCK) != 0) in main() 347 if (fcntl(sv[0], F_SETFL, O_NONBLOCK) != 0) in main() 350 if (fcntl(sv[1], F_SETFL, O_NONBLOCK) != 0) in main()
|
| /freebsd-10-stable/tools/regression/sockets/accept_fd_leak/ |
| D | accept_fd_leak.c | 110 i = fcntl(s, F_GETFL); in main() 114 if (fcntl(s, F_SETFL, i) != 0) in main() 116 i = fcntl(s, F_GETFL); in main() 177 i = fcntl(s, F_GETFL); in main() 181 if (fcntl(s, F_SETFL, i) != 0) in main() 183 i = fcntl(s, F_GETFL); in main()
|
| /freebsd-10-stable/contrib/apr/include/arch/unix/ |
| D | apr_arch_inherit.h | 30 int flags = fcntl(the##name->name##des, F_GETFD); \ 34 if (fcntl(the##name->name##des, F_SETFD, flags) == -1) \ 51 if ((flags = fcntl(the##name->name##des, F_GETFD)) == -1) \ 54 if (fcntl(the##name->name##des, F_SETFD, flags) == -1) \
|
| /freebsd-10-stable/cddl/contrib/dtracetoolkit/Examples/ |
| D | tcl_syscolors_example.txt | 183 [2;32m 0 16624 15 syscall -> fcntl[0m 184 [2;32m 0 16624 7 syscall <- fcntl[0m 309 [2;32m 0 16624 8 syscall -> fcntl[0m 310 [2;32m 0 16624 7 syscall <- fcntl[0m 465 [2;32m 0 16624 8 syscall -> fcntl[0m 466 [2;32m 0 16624 7 syscall <- fcntl[0m 538 [2;32m 0 16624 41 syscall -> fcntl[0m 539 [2;32m 0 16624 11 syscall <- fcntl[0m 540 [2;32m 0 16624 7 syscall -> fcntl[0m 541 [2;32m 0 16624 7 syscall <- fcntl[0m [all …]
|
| /freebsd-10-stable/tools/regression/netinet/tcpfullwindowrst/ |
| D | tcpfullwindowrsttest.c | 97 fcntl(t, F_SETFL, fcntl(t, F_GETFL) | O_NONBLOCK); in main() 98 fcntl(u, F_SETFL, fcntl(t, F_GETFL) | O_NONBLOCK); in main()
|
| /freebsd-10-stable/contrib/ntp/libntp/ |
| D | socket.c | 102 newfd = fcntl(fd, F_DUPFD, socket_boundary); in move_fd() 146 if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) { in make_socket_nonblocking() 152 if (fcntl(fd, F_SETFL, FNDELAY) < 0) { in make_socket_nonblocking() 158 if (fcntl(fd, F_SETFL, O_NDELAY) < 0) { in make_socket_nonblocking()
|
| D | iosignal.c | 155 if (fcntl(rio->fd, F_SETFL, FNDELAY|FASYNC) < 0) in init_clock_sig() 183 if (fcntl(rio->fd, F_SETOWN, getpid()) == -1) in init_clock_sig() 189 if (fcntl(rio->fd, F_SETFL, FNDELAY|FASYNC) < 0) in init_clock_sig() 235 if ((flags = fcntl(fd, F_GETFL, 0)) == -1) in init_socket_sig() 241 if (fcntl(fd, F_SETFL, flags|FASYNC) < 0) in init_socket_sig() 273 if (fcntl(fd, F_SETOWN, pgrp) == -1) in init_socket_sig()
|
| /freebsd-10-stable/contrib/netbsd-tests/net/net/ |
| D | t_tcp.c | 121 fl = fcntl(srvr, F_GETFL, 0); in paccept_block() 125 ok = fcntl(srvr, F_SETFL, fl & ~O_NONBLOCK); in paccept_block() 136 fl = fcntl(as, F_GETFL, 0); in paccept_block() 141 ok = fcntl(as, F_SETFL, fl & ~O_NONBLOCK); in paccept_block() 145 fl = fcntl(as, F_GETFL, 0); in paccept_block()
|
| /freebsd-10-stable/tools/regression/security/cap_test/ |
| D | cap_test_fcntl.c | 107 CHECK_SYSCALL_SUCCEEDS(fcntl, f.f_fd, F_GETFL, 0); in test_fcntl() 109 if (fcntl(f.f_fd, F_GETFL, 0) == -1) in test_fcntl() 112 CHECK_NOTCAPABLE(fcntl, cap, F_GETFL, 0); in test_fcntl()
|
| /freebsd-10-stable/sys/dev/sfxge/common/ |
| D | ef10_phy.c | 78 __in unsigned int fcntl, in mcdi_phy_decode_link_mode() argument 104 if (fcntl == MC_CMD_FCNTL_OFF) in mcdi_phy_decode_link_mode() 106 else if (fcntl == MC_CMD_FCNTL_RESPOND) in mcdi_phy_decode_link_mode() 108 else if (fcntl == MC_CMD_FCNTL_GENERATE) in mcdi_phy_decode_link_mode() 110 else if (fcntl == MC_CMD_FCNTL_BIDIR) in mcdi_phy_decode_link_mode() 113 EFSYS_PROBE1(mc_pcol_error, int, fcntl); in mcdi_phy_decode_link_mode() 128 unsigned int fcntl; in ef10_phy_link_ev() local 157 &link_mode, &fcntl); in ef10_phy_link_ev() 173 epp->ep_fcntl = fcntl; in ef10_phy_link_ev()
|
| /freebsd-10-stable/usr.sbin/ppp/ |
| D | prompt.c | 423 stat = fcntl(fd, F_GETFL, 0); in prompt_TtyInit() 426 fcntl(fd, F_SETFL, stat); in prompt_TtyInit() 462 stat = fcntl(p->fd_in, F_GETFL, 0); in prompt_TtyCommandMode() 465 fcntl(p->fd_in, F_SETFL, stat); in prompt_TtyCommandMode() 482 stat = fcntl(p->fd_in, F_GETFL, 0); in prompt_TtyTermMode() 485 fcntl(p->fd_in, F_SETFL, stat); in prompt_TtyTermMode() 495 stat = fcntl(p->fd_in, F_GETFL, 0); in prompt_TtyOldMode() 498 fcntl(p->fd_in, F_SETFL, stat); in prompt_TtyOldMode()
|
| /freebsd-10-stable/crypto/heimdal/lib/roken/ |
| D | flock.c | 62 code = fcntl(fd, F_SETLK, &arg); in rk_flock() 66 code = fcntl(fd, cmd, &arg); in rk_flock() 70 code = fcntl(fd, cmd, &arg); in rk_flock()
|
| D | cloexec.c | 44 ret = fcntl(fd, F_GETFD); in rk_cloexec() 47 if (fcntl(fd, F_SETFD, ret | FD_CLOEXEC) == -1) in rk_cloexec()
|
| /freebsd-10-stable/contrib/apr/file_io/unix/ |
| D | pipe.c | 41 fd_flags = fcntl(thepipe->filedes, F_GETFL, 0); in pipeblock() 52 if (fcntl(thepipe->filedes, F_SETFL, fd_flags) == -1) { in pipeblock() 75 int fd_flags = fcntl(thepipe->filedes, F_GETFL, 0); in pipenonblock() 87 if (fcntl(thepipe->filedes, F_SETFL, fd_flags) == -1) { in pipenonblock()
|
| /freebsd-10-stable/tools/regression/filemon/ |
| D | filemontest.c | 65 (void)fcntl(fm_fd, F_SETFD, FD_CLOEXEC); in main() 66 (void)fcntl(fm_log, F_SETFD, FD_CLOEXEC); in main()
|