Home
last modified time | relevance | path

Searched refs:fcntl (Results 1 – 25 of 421) sorted by relevance

12345678910>>...17

/freebsd-10-stable/tools/regression/capsicum/syscalls/
Dcap_fcntls_limit.c56 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 …]
Dcap_ioctls_limit.c56 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/
Ddup_test.c95 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 …]
Dflock_helper.c158 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 …]
Dfcntlflags_test.c55 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/
Dt_pipe2.c69 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 …]
Dt_socketpair.c81 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/
Dproc.c93 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/
Dt_closefrom.c59 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/
Dinflow.c124 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/
Dkqueue.c272 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/
Daccept_fd_leak.c110 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/
Dapr_arch_inherit.h30 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/
Dtcl_syscolors_example.txt183  0 16624 15 syscall -> fcntl
184  0 16624 7 syscall <- fcntl
309  0 16624 8 syscall -> fcntl
310  0 16624 7 syscall <- fcntl
465  0 16624 8 syscall -> fcntl
466  0 16624 7 syscall <- fcntl
538  0 16624 41 syscall -> fcntl
539  0 16624 11 syscall <- fcntl
540  0 16624 7 syscall -> fcntl
541  0 16624 7 syscall <- fcntl
[all …]
/freebsd-10-stable/tools/regression/netinet/tcpfullwindowrst/
Dtcpfullwindowrsttest.c97 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/
Dsocket.c102 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()
Diosignal.c155 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/
Dt_tcp.c121 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/
Dcap_test_fcntl.c107 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/
Def10_phy.c78 __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/
Dprompt.c423 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/
Dflock.c62 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()
Dcloexec.c44 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/
Dpipe.c41 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/
Dfilemontest.c65 (void)fcntl(fm_fd, F_SETFD, FD_CLOEXEC); in main()
66 (void)fcntl(fm_log, F_SETFD, FD_CLOEXEC); in main()

12345678910>>...17