/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/sys/contrib/openzfs/lib/libzfs/os/linux/ |
H A D | libzfs_pool_os.c | 64 if ((fd = open(path, O_RDWR|O_DIRECT|O_CLOEXEC)) < 0) { in zpool_relabel_disk() 109 if ((fd = open(diskname, O_RDONLY|O_DIRECT|O_CLOEXEC)) >= 0) { in read_efi_label() 161 if ((fd = open(path, O_RDONLY|O_DIRECT|O_CLOEXEC)) < 0) in zpool_label_disk_check() 192 fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC); in zpool_label_name() 241 if ((fd = open(path, O_RDWR|O_DIRECT|O_EXCL|O_CLOEXEC)) < 0) { in zpool_label_disk()
|
/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) { in __dup3() 54 how = (flags & O_CLOEXEC) ? F_DUP2FD_CLOEXEC : F_DUP2FD; 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/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/contrib/jemalloc/src/ |
H A D | pages.c | 481 #if defined(O_CLOEXEC) in os_overcommits_proc() 483 O_CLOEXEC); in os_overcommits_proc() 491 #if defined(O_CLOEXEC) in os_overcommits_proc() 493 AT_FDCWD, "/proc/sys/vm/overcommit_memory", O_RDONLY | O_CLOEXEC); in os_overcommits_proc() 502 #if defined(O_CLOEXEC) in os_overcommits_proc() 503 fd = open("/proc/sys/vm/overcommit_memory", O_RDONLY | O_CLOEXEC); in os_overcommits_proc()
|
/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/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/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/tests/sys/file/ |
H A D | dup_test.c | 309 if ((fd2 = dup3(fd1, fd1 + 1, O_CLOEXEC)) < 0) in main() 360 if (dup3(fd1, fd1, O_CLOEXEC) != -1) in main() 376 if ((fd2 = dup3(fd1, rlp.rlim_cur + 1, O_CLOEXEC)) >= 0) in main()
|
/freebsd/contrib/libarchive/libarchive/ |
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
|
H A D | archive_write_open_filename.c | 54 #ifndef O_CLOEXEC 55 #define O_CLOEXEC 0 macro 143 flags = O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_CLOEXEC; in file_open()
|
H A D | archive_read_disk_entry_from_file.c | 99 #ifndef O_CLOEXEC 100 #define O_CLOEXEC 0 macro 232 O_RDONLY | O_NONBLOCK | O_CLOEXEC); in archive_read_disk_entry_from_file() 235 O_CLOEXEC); in archive_read_disk_entry_from_file() 875 O_RDONLY | O_NONBLOCK | O_CLOEXEC); in setup_sparse_fiemap() 877 *fd = open(path, O_RDONLY | O_NONBLOCK | O_CLOEXEC); in setup_sparse_fiemap() 996 *fd = open(path, O_RDONLY | O_NONBLOCK | O_CLOEXEC); in setup_sparse()
|
/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/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/openzfs/tests/zfs-tests/cmd/ |
H A D | idmap_util.c | 96 #define OPEN_TREE_CLOEXEC O_CLOEXEC 308 fd = open(path, O_WRONLY | O_CLOEXEC); in write_idmap() 443 fd = open(path, O_RDONLY | O_CLOEXEC); in userns_fd_from_pid() 574 ret = openat(-EBADF, path, O_DIRECTORY | O_CLOEXEC); in is_idmap_supported() 663 ret = openat(-EBADF, source, O_DIRECTORY | O_CLOEXEC); in do_idmap_mount()
|
/freebsd/sys/contrib/openzfs/etc/systemd/system-generators/ |
H A D | zfs-mount-generator.c | 310 O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, "w", in line_worker() 619 O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, "w", 0644); in line_worker() 712 O_PATH | O_DIRECTORY | O_CLOEXEC); in line_worker() 781 int kmfd = open("/dev/kmsg", O_WRONLY | O_CLOEXEC); in main() 806 destdir_fd = open(destdir, O_PATH | O_DIRECTORY | O_CLOEXEC); in main() 886 O_RDONLY | O_CLOEXEC, "r", 0); in main()
|
/freebsd/lib/libkvm/ |
H A D | kvm.c | 140 if ((kd->pmfd = open(mf, flag | O_CLOEXEC, 0)) < 0) { in _kvm_open() 161 kd->vmfd = open(_PATH_DEVNULL, O_RDONLY | O_CLOEXEC); in _kvm_open() 164 if ((kd->vmfd = open(_PATH_KMEM, flag | O_CLOEXEC)) < in _kvm_open() 178 if ((kd->nlfd = open(uf, O_RDONLY | O_CLOEXEC, 0)) < 0) { in _kvm_open()
|
/freebsd/lib/libsys/x86/ |
H A D | __vdso_gettc.c | 264 (fd = _open(devname, O_RDONLY | O_CLOEXEC)) == -1) { in __vdso_init_hpet() 300 fd = _open(HYPERV_REFTSC_DEVPATH, O_RDONLY | O_CLOEXEC); in __vdso_init_hyperv_tsc() 389 (fd = _open("/dev/" PVCLOCK_CDEVNAME, O_RDONLY | O_CLOEXEC)) < 0) in __vdso_init_pvclock_timeinfos()
|