| /freebsd/cddl/contrib/opensolaris/tests/os-tests/tests/oclo/ |
| H A D | oclo.c | 229 if ((c->clo_flags & FD_CLOEXEC) != 0) in oclo_file() 269 oclo_setfd_common(c, FD_CLOEXEC); in oclo_setfd_exec() 281 oclo_setfd_common(c, FD_CLOFORK | FD_CLOEXEC); in oclo_setfd_both() 339 oclo_fdup_common(c, FD_CLOEXEC, F_DUPFD_CLOEXEC); in oclo_fdupfd_exec() 359 oclo_fdup_common(c, FD_CLOEXEC, F_DUP2FD_CLOEXEC); in oclo_fdup2fd_exec() 371 oclo_fdup_common(c, FD_CLOEXEC, F_DUP3FD); in oclo_fdup3fd_exec() 383 oclo_fdup_common(c, FD_CLOEXEC | FD_CLOFORK, F_DUP3FD); in oclo_fdup3fd_both() 394 if ((targ_flags & FD_CLOEXEC) != 0) in oclo_dup_common() 421 oclo_dup_common(c, FD_CLOEXEC, true); in oclo_dup3_exec() 433 oclo_dup_common(c, FD_CLOEXEC | FD_CLOFORK, true); in oclo_dup3_both() [all …]
|
| H A D | ocloexec_verify.c | 67 bool fail = (exp_flags & FD_CLOEXEC) != 0; in verify_flags() 144 (val < 0 || val > (FD_CLOEXEC | FD_CLOFORK))) { in main()
|
| /freebsd/tools/regression/capsicum/syscalls/ |
| H A D | cap_ioctls_limit.c | 54 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in ioctl_tests_0() 75 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in ioctl_tests_0() 95 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in ioctl_tests_0() 99 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in ioctl_tests_0() 116 CHECK(fcntl(fd, F_SETFD, FD_CLOEXEC) == 0); in ioctl_tests_0() 117 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in ioctl_tests_0() 121 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in ioctl_tests_0() 162 CHECK(fcntl(fd, F_SETFD, FD_CLOEXEC) == 0); in ioctl_tests_1() 163 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in ioctl_tests_1() 167 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in ioctl_tests_1() [all...] |
| H A D | cap_fcntls_limit.c | 53 CHECK(fcntl(fd, F_SETFD, FD_CLOEXEC) == 0); in fcntl_tests_0() 54 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in fcntl_tests_0() 77 CHECK(fcntl(fd, F_SETFD, FD_CLOEXEC) == 0); in fcntl_tests_0() 78 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in fcntl_tests_0() 100 CHECK(fcntl(fd, F_SETFD, FD_CLOEXEC) == 0); in fcntl_tests_0() 101 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in fcntl_tests_0() 133 CHECK(fcntl(fd, F_SETFD, FD_CLOEXEC) == 0); in fcntl_tests_0() 134 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in fcntl_tests_0() 185 CHECK(fcntl(fd, F_SETFD, FD_CLOEXEC) == 0); in fcntl_tests_1() 186 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC); in fcntl_tests_1() [all...] |
| /freebsd/contrib/netbsd-tests/lib/libc/sys/ |
| H A D | t_pipe2.c | 71 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) != 0); in run() 72 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) != 0); in run() 74 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) == 0); in run() 75 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) == 0); in run()
|
| H A D | t_socketpair.c | 83 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) != 0); in run() 84 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) != 0); in run() 86 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) == 0); in run() 87 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) == 0); in run()
|
| /freebsd/lib/libc/gen/ |
| H A D | fdopendir.c | 58 if ((flags & FD_CLOEXEC) == 0) { in fdopendir() 59 rc = _fcntl(fd, F_SETFD, flags | FD_CLOEXEC); in fdopendir()
|
| H A D | dup3.c | 54 fdflags = ((flags & O_CLOEXEC) != 0 ? FD_CLOEXEC : 0) | in __dup3()
|
| /freebsd/lib/libc/stdio/ |
| H A D | fdopen.c | 85 if ((tmp & FD_CLOEXEC) == 0) { in fdopen() 86 rc = _fcntl(fd, F_SETFD, tmp | FD_CLOEXEC); in fdopen()
|
| H A D | freopen.c | 118 if (fdflags != -1 && (fdflags & FD_CLOEXEC) == 0) in freopen() 120 fdflags | FD_CLOEXEC); in freopen()
|
| /freebsd/contrib/netbsd-tests/lib/librumpclient/ |
| H A D | h_execthr.c | 168 if (rump_sys_fcntl(p1[0], F_SETFD, FD_CLOEXEC) == -1) in main() 170 if (rump_sys_fcntl(p1[1], F_SETFD, FD_CLOEXEC) == -1) in main()
|
| H A D | h_exec.c | 103 if (rump_sys_fcntl(s1, F_SETFD, FD_CLOEXEC) == -1) { in main()
|
| /freebsd/contrib/tcsh/ |
| H A D | tc.os.h | 194 # ifndef FD_CLOEXEC 195 # define FD_CLOEXEC 1 macro 197 # define close_on_exec(fd, v) fcntl((fd), F_SETFD, ((v) ? FD_CLOEXEC : 0))
|
| /freebsd/contrib/blocklist/port/ |
| H A D | popenve.c | 98 fcntl(pdes[0], F_SETFD, FD_CLOEXEC); in pdes_get() 99 fcntl(pdes[1], F_SETFD, FD_CLOEXEC); in pdes_get()
|
| /freebsd/crypto/heimdal/lib/roken/ |
| H A D | cloexec.c | 47 if (fcntl(fd, F_SETFD, ret | FD_CLOEXEC) == -1) in rk_cloexec()
|
| /freebsd/contrib/llvm-project/lldb/source/Host/posix/ |
| H A D | PipePosix.cpp | 43 #if defined(FD_CLOEXEC) && !PIPE2_SUPPORTED 48 return (::fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == 0); in SetCloexecFlag() 91 #ifdef FD_CLOEXEC in CreateNew()
|
| /freebsd/sys/contrib/libsodium/src/libsodium/randombytes/sysrandom/ |
| H A D | randombytes_sysrandom.c | 190 # if defined(F_SETFD) && defined(FD_CLOEXEC) in randombytes_sysrandom_random_dev_open() 191 (void) fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); in randombytes_sysrandom_random_dev_open()
|
| /freebsd/lib/libc/tests/gen/ |
| H A D | popen_test.c | 61 exp_flags = FD_CLOEXEC; in check_cloexec() 64 ATF_CHECK_MSG((flags & FD_CLOEXEC) == exp_flags, in check_cloexec()
|
| /freebsd/crypto/openssl/ssl/rio/ |
| H A D | rio_notifier.c | 22 #if !defined(SOCK_CLOEXEC) && defined(FD_CLOEXEC) in set_cloexec() 23 return fcntl(fd, F_SETFD, FD_CLOEXEC) >= 0; in set_cloexec()
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/rtsan/tests/ |
| H A D | rtsan_test_interceptors.cpp | 240 ASSERT_THAT(fcntl(fd, F_SETFD, FD_CLOEXEC), Eq(0)); in TEST_F() 244 ASSERT_THAT(flags & FD_CLOEXEC, Eq(FD_CLOEXEC)); in TEST_F()
|
| /freebsd/tests/sys/file/ |
| H A D | dup_test.c | 287 if (fcntl(fd2, F_GETFD) != FD_CLOEXEC) in main() 327 if (fcntl(fd2, F_GETFD) != FD_CLOEXEC) in main()
|
| /freebsd/contrib/jemalloc/src/ |
| H A D | pages.c | 639 fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); in pages_boot() 650 fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); in pages_boot() 659 fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
|
| /freebsd/tests/sys/posixshm/ |
| H A D | memfd_test.c | 72 ATF_REQUIRE((fcntl(fd_nocl, F_GETFD) & FD_CLOEXEC) == 0); in ATF_TC_BODY() 73 ATF_REQUIRE((fcntl(fd_cl, F_GETFD) & FD_CLOEXEC) != 0); in ATF_TC_BODY()
|
| /freebsd/lib/libutil/ |
| H A D | flopen.c | 112 if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) { in vflopenat()
|
| /freebsd/tools/build/cross-build/ |
| H A D | closefrom.c | 68 (void)fcntl(fd, F_SETFD, FD_CLOEXEC); in closefrom_close()
|