| /freebsd/lib/libc/tests/stdio/ |
| H A D | mkostemp_test.c | 71 (oflags & O_CLOEXEC ? FD_CLOEXEC : 0)) { in test_one() 140 ATF_TC_WITHOUT_HEAD(O_CLOEXEC); 141 ATF_TC_BODY(O_CLOEXEC, tc) in ATF_TC_BODY() argument 144 test_one(O_CLOEXEC); in ATF_TC_BODY() 158 test_one(O_APPEND|O_CLOEXEC); in ATF_TC_BODY() 176 ATF_TP_ADD_TC(tp, O_CLOEXEC); in ATF_TP_ADD_TCS()
|
| /freebsd/tests/sys/fifo/ |
| H A D | fifo_kqueue.c | 51 O_RDONLY | O_CLOEXEC | O_NONBLOCK)) >= 0); in ATF_TC_BODY() 53 O_WRONLY | O_CLOEXEC | O_NONBLOCK)) >= 0); in ATF_TC_BODY() 152 O_RDONLY | O_CLOEXEC | O_NONBLOCK)) >= 0); in ATF_TC_BODY() 154 O_WRONLY | O_CLOEXEC | O_NONBLOCK)) >= 0); in ATF_TC_BODY() 201 O_RDONLY | O_CLOEXEC | O_NONBLOCK)) >= 0); in ATF_TC_BODY() 231 O_RDONLY | O_CLOEXEC | O_NONBLOCK)) >= 0); in ATF_TC_BODY() 233 O_WRONLY | O_CLOEXEC | O_NONBLOCK)) >= 0); in ATF_TC_BODY() 285 O_RDONLY | O_CLOEXEC | O_NONBLOCK)) >= 0); in ATF_TC_BODY() 287 O_WRONLY | O_CLOEXEC | O_NONBLOCK)) >= 0); in ATF_TC_BODY() 338 O_RDONLY | O_CLOEXEC | O_NONBLOCK)) >= 0); in ATF_TC_BODY() [all …]
|
| /freebsd/contrib/netbsd-tests/lib/libc/sys/ |
| H A D | t_dup.c | 82 fd = dup3(fd1, fd2, O_CLOEXEC); in check_mode() 219 ATF_REQUIRE(dup3(fd, fd, O_CLOEXEC) == -1); in ATF_TC_BODY() 221 ATF_REQUIRE(dup3(fd, fd, O_CLOEXEC) != -1); in ATF_TC_BODY() 226 ATF_REQUIRE_ERRNO(EINVAL, dup3(-1, -1, O_CLOEXEC) == -1); in ATF_TC_BODY() 227 ATF_REQUIRE_ERRNO(EBADF, dup3(fd, -1, O_CLOEXEC) == -1); in ATF_TC_BODY() 229 ATF_REQUIRE_ERRNO(EBADF, dup3(-1, -1, O_CLOEXEC) == -1); in ATF_TC_BODY() 233 ATF_REQUIRE_ERRNO(EBADF, dup3(fd, -1, O_CLOEXEC) == -1); in ATF_TC_BODY() 236 ATF_REQUIRE_ERRNO(EBADF, dup3(-1, fd, O_CLOEXEC) == -1); in ATF_TC_BODY() 259 res.rlim_cur + 1, O_CLOEXEC) == -1); in ATF_TC_BODY()
|
| H A D | t_pipe2.c | 70 if (flags & O_CLOEXEC) { in run() 143 err = pipe2(filedes, O_CLOEXEC); in ATF_TC_BODY() 168 run(O_CLOEXEC); in ATF_TC_BODY()
|
| /freebsd/lib/libc/db/db/ |
| H A D | db.c | 43 #ifndef O_CLOEXEC 44 #define O_CLOEXEC 0 macro 60 O_RDONLY | O_RDWR | O_SHLOCK | O_SYNC | O_TRUNC | O_CLOEXEC) in dbopen()
|
| /freebsd/lib/libc/gen/ |
| H A D | kqueue1.c | 43 if ((openflags & ~(O_CLOEXEC | O_NONBLOCK)) != 0) { in kqueue1() 49 if ((openflags & O_CLOEXEC) != 0) in kqueue1()
|
| H A D | dup3.c | 49 if ((flags & ~(O_CLOEXEC | O_CLOFORK)) != 0) { in __dup3() 54 fdflags = ((flags & O_CLOEXEC) != 0 ? FD_CLOEXEC : 0) | in __dup3()
|
| H A D | pututxline.c | 49 fd = _open(file, O_CREAT|O_RDWR|O_EXLOCK|O_CLOEXEC, 0644); in futx_open() 240 fd = _open(_PATH_UTX_LASTLOGIN, O_RDWR|O_CLOEXEC, 0644); in utx_lastlogin_upgrade() 274 fd = _open(_PATH_UTX_LOG, O_CREAT|O_WRONLY|O_APPEND|O_CLOEXEC, 0644); in utx_log_add()
|
| /freebsd/sys/contrib/openzfs/lib/libzfs/os/linux/ |
| H A D | libzfs_pool_os.c | 65 if ((fd = open(path, O_RDWR|O_DIRECT|O_CLOEXEC)) < 0) { in zpool_relabel_disk() 110 if ((fd = open(diskname, O_RDONLY|O_DIRECT|O_CLOEXEC)) >= 0) { in read_efi_label() 162 if ((fd = open(path, O_RDONLY|O_DIRECT|O_CLOEXEC)) < 0) in zpool_label_disk_check() 193 fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC); in zpool_label_name() 242 if ((fd = open(path, O_RDWR|O_DIRECT|O_EXCL|O_CLOEXEC)) < 0) { in zpool_label_disk()
|
| /freebsd/lib/libutil/ |
| H A D | uucplock.c | 75 if ((tmpfd = open(lcktmpname, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC, in uu_lock() 88 if ((fd = open(lckname, O_RDONLY | O_CLOEXEC)) < 0) in uu_lock() 132 if ((fd = open(lckname, O_RDWR | O_CLOEXEC)) < 0) in uu_lock_txfr()
|
| H A D | pidfile.c | 81 fd = openat(dirfd, filename, O_RDONLY | O_CLOEXEC); in pidfile_read_impl() 159 dirfd = open(pfh->pf_dir, O_CLOEXEC | O_DIRECTORY | O_NONBLOCK); in pidfile_open() 174 O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NONBLOCK, mode); in pidfile_open() 349 O_RDONLY | O_CLOEXEC | O_NONBLOCK); in pidfile_signal()
|
| /freebsd/cddl/contrib/opensolaris/tests/os-tests/tests/oclo/ |
| H A D | oclo.c | 230 flags |= O_CLOEXEC; in oclo_file() 395 dflags |= O_CLOEXEC; in oclo_dup_common() 442 flags |= O_CLOEXEC; in oclo_pipe() 712 .clo_flags = O_CLOFORK | O_CLOEXEC, 716 .clo_flags = O_CLOEXEC, 728 .clo_flags = O_CLOFORK | O_CLOEXEC, 732 .clo_flags = O_CLOEXEC, 744 .clo_flags = O_CLOFORK | O_CLOEXEC, 748 .clo_flags = O_CLOEXEC, 760 .clo_flags = O_CLOFORK | O_CLOEXEC, [all …]
|
| H A D | oclo_errors.c | 141 if (!oclo_dup3("dup3(): O_NONBLOCK|O_CLOXEC", O_NONBLOCK | O_CLOEXEC)) { in main() 167 if (!oclo_pipe2("pipe2(): O_SYNC|O_CLOXEC", O_SYNC | O_CLOEXEC)) { in main()
|
| /freebsd/sys/contrib/openzfs/lib/libspl/ |
| H A D | random.c | 51 VERIFY((random_fd = open(RANDOM_PATH, O_RDONLY | O_CLOEXEC)) != -1); in random_init() 52 VERIFY((urandom_fd = open(URANDOM_PATH, O_RDONLY | O_CLOEXEC)) != -1); in random_init()
|
| /freebsd/contrib/jemalloc/src/ |
| H A D | pages.c | 633 #if defined(O_CLOEXEC) in pages_boot() 635 O_CLOEXEC); in pages_boot() 643 #if defined(O_CLOEXEC) in pages_boot() 645 AT_FDCWD, "/proc/sys/vm/overcommit_memory", O_RDONLY | O_CLOEXEC); in pages_boot() 654 #if defined(O_CLOEXEC) in pages_boot() 655 fd = open("/proc/sys/vm/overcommit_memory", O_RDONLY | O_CLOEXEC); in pages_boot()
|
| /freebsd/tests/sys/kern/pipe/ |
| H A D | pipe_kqueue_test.c | 48 ATF_REQUIRE(pipe2(p, O_CLOEXEC | O_NONBLOCK) == 0); in ATF_TC_BODY() 146 ATF_REQUIRE(pipe2(p, O_CLOEXEC | O_NONBLOCK) == 0); in ATF_TC_BODY() 190 ATF_REQUIRE(pipe2(p, O_CLOEXEC | O_NONBLOCK) == 0); in ATF_TC_BODY() 248 ATF_REQUIRE(pipe2(p, O_CLOEXEC | O_NONBLOCK) == 0); in ATF_TC_BODY() 301 ATF_REQUIRE(pipe2(p, O_CLOEXEC | O_NONBLOCK) == 0); in ATF_TC_BODY()
|
| /freebsd/usr.bin/runat/ |
| H A D | runat.c | 43 flags = O_RDONLY | O_CLOEXEC | O_PATH; in main() 88 nameddir_fd = openat(file_fd, ".", O_RDONLY | O_CLOEXEC | O_NAMEDATTR, in main()
|
| /freebsd/contrib/ntp/sntp/ |
| H A D | sntp-opts.c | 847 #ifndef O_CLOEXEC in doOptKod() 848 # define O_CLOEXEC 0 in doOptKod() macro 850 mode.file_flags = O_CLOEXEC; in doOptKod() 874 #ifndef O_CLOEXEC in doOptKeyfile() 875 # define O_CLOEXEC 0 in doOptKeyfile() macro 877 mode.file_flags = O_CLOEXEC; in doOptKeyfile() 899 #ifndef O_CLOEXEC in doOptLogfile() 900 # define O_CLOEXEC 0 in doOptLogfile() macro 902 mode.file_flags = O_CLOEXEC; in doOptLogfile()
|
| /freebsd/contrib/libarchive/libarchive/ |
| H A D | archive_write_open_filename.c | 54 #ifndef O_CLOEXEC 55 #define O_CLOEXEC 0 macro 144 flags = O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_CLOEXEC; in file_open()
|
| H A D | archive_random.c | 75 #ifndef O_CLOEXEC 76 #define O_CLOEXEC 0 235 fd = open(RANDOMDEV, O_RDONLY | O_CLOEXEC, 0); in arc4_stir() 77 #define O_CLOEXEC global() macro
|
| /freebsd/contrib/openbsm/compat/ |
| H A D | pidfile.h | 129 #ifdef O_CLOEXEC in pidfile_open() 130 O_WRONLY | O_CREAT | O_TRUNC | O_NONBLOCK | O_CLOEXEC, mode); in pidfile_open() 154 #ifndef O_CLOEXEC in pidfile_open()
|
| /freebsd/tools/test/stress2/misc/ |
| H A D | nullfs29.sh | 46 new_dir = openat(AT_FDCWD, dir, O_RDONLY|O_DIRECTORY|O_CLOEXEC|O_PATH, 0700); 57 new_file = openat(AT_FDCWD, path, O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0644);
|
| /freebsd/tests/sys/file/ |
| H A D | dup_test.c | 311 if ((fd2 = dup3(fd1, fd1 + 1, O_CLOEXEC)) < 0) in main() 362 if (dup3(fd1, fd1, O_CLOEXEC) != -1) in main() 378 if ((fd2 = dup3(fd1, rlp.rlim_cur + 1, O_CLOEXEC)) >= 0) in main()
|
| /freebsd/contrib/unbound/compat/ |
| H A D | arc4random.c | 106 #ifdef O_CLOEXEC in fallback_getentropy_urandom() 107 flags |= O_CLOEXEC; in fallback_getentropy_urandom() 115 #ifndef O_CLOEXEC in fallback_getentropy_urandom()
|
| /freebsd/sys/contrib/zlib/ |
| H A D | gzlib.c | 136 #ifdef O_CLOEXEC in gz_open() 138 oflag |= O_CLOEXEC; in gz_open() 260 #ifdef O_CLOEXEC in gz_open() 261 if (oflag & O_CLOEXEC) in gz_open() 262 fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | O_CLOEXEC); in gz_open()
|