Home
last modified time | relevance | path

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

123456789

/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/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 | O_CLOFORK)) != 0) { in __dup3()
54 fdflags = ((flags & O_CLOEXEC) != 0 ? FD_CLOEXEC : 0) | 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/sys/contrib/openzfs/lib/libzfs/os/linux/
H A Dlibzfs_pool_os.c65 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 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/cddl/contrib/opensolaris/tests/os-tests/tests/oclo/
H A Doclo.c230 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 Doclo_errors.c141 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 Drandom.c51 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 Dpages.c633 #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 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/usr.bin/runat/
H A Drunat.c43 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 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/libarchive/libarchive/
H A Darchive_write_open_filename.c54 #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 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
/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/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/tests/sys/file/
H A Ddup_test.c311 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 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/zlib/
H A Dgzlib.c136 #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()

123456789