Home
last modified time | relevance | path

Searched refs:O_CLOEXEC (Results 1 – 25 of 182) sorted by relevance

12345678

/freebsd/lib/libc/tests/stdio/
H A Dmkostemp_test.c71 (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 Dfifo_kqueue.c51 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 Dt_dup.c82 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 Dt_pipe2.c70 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 Ddb.c43 #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 Dlibzfs_pool_os.c64 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 Dkqueue1.c43 if ((openflags & ~(O_CLOEXEC | O_NONBLOCK)) != 0) { in kqueue1()
49 if ((openflags & O_CLOEXEC) != 0) in kqueue1()
H A Ddup3.c49 if (flags & ~O_CLOEXEC) { in __dup3()
54 how = (flags & O_CLOEXEC) ? F_DUP2FD_CLOEXEC : F_DUP2FD; in __dup3()
H A Dpututxline.c49 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 Duucplock.c75 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 Dpidfile.c81 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 Dpages.c481 #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 Dpipe_kqueue_test.c48 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 Dsntp-opts.c847 #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 Dpidfile.h129 #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 Ddup_test.c309 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 Darchive_random.c75 #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 Darchive_write_open_filename.c54 #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 Darchive_read_disk_entry_from_file.c99 #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 Dnullfs29.sh46 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 Darc4random.c106 #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 Didmap_util.c96 #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 Dzfs-mount-generator.c310 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 Dkvm.c140 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.c264 (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()

12345678