Searched refs:O_CLOEXEC (Results 1 - 25 of 113) sorted by relevance

12345

/freebsd-11-stable/lib/libc/gen/
H A Ddup3.c50 if (flags & ~O_CLOEXEC) {
55 how = (flags & O_CLOEXEC) ? F_DUP2FD_CLOEXEC : F_DUP2FD;
H A Dpututxline.c50 fd = _open(file, O_CREAT|O_RDWR|O_EXLOCK|O_CLOEXEC, 0644);
241 fd = _open(_PATH_UTX_LASTLOGIN, O_RDWR|O_CLOEXEC, 0644);
275 fd = _open(_PATH_UTX_LOG, O_CREAT|O_WRONLY|O_APPEND|O_CLOEXEC, 0644);
/freebsd-11-stable/lib/libc/tests/stdio/
H A Dmkostemp_test.c74 (oflags & O_CLOEXEC ? FD_CLOEXEC : 0)) {
143 ATF_TC_WITHOUT_HEAD(O_CLOEXEC); variable
144 ATF_TC_BODY(O_CLOEXEC, tc)
147 test_one(O_CLOEXEC);
161 test_one(O_APPEND|O_CLOEXEC);
179 ATF_TP_ADD_TC(tp, O_CLOEXEC);
/freebsd-11-stable/lib/libc/db/db/
H A Ddb.c47 #ifndef O_CLOEXEC
48 #define O_CLOEXEC 0 macro
58 O_RDONLY | O_RDWR | O_SHLOCK | O_SYNC | O_TRUNC | O_CLOEXEC)
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/sys/
H A Dt_dup.c82 fd = dup3(fd1, fd2, O_CLOEXEC);
219 ATF_REQUIRE(dup3(fd, fd, O_CLOEXEC) == -1);
221 ATF_REQUIRE(dup3(fd, fd, O_CLOEXEC) != -1);
226 ATF_REQUIRE_ERRNO(EINVAL, dup3(-1, -1, O_CLOEXEC) == -1);
227 ATF_REQUIRE_ERRNO(EBADF, dup3(fd, -1, O_CLOEXEC) == -1);
229 ATF_REQUIRE_ERRNO(EBADF, dup3(-1, -1, O_CLOEXEC) == -1);
233 ATF_REQUIRE_ERRNO(EBADF, dup3(fd, -1, O_CLOEXEC) == -1);
236 ATF_REQUIRE_ERRNO(EBADF, dup3(-1, fd, O_CLOEXEC) == -1);
259 res.rlim_cur + 1, O_CLOEXEC) == -1);
H A Dt_pipe2.c68 if (flags & O_CLOEXEC) {
141 err = pipe2(filedes, O_CLOEXEC);
166 run(O_CLOEXEC);
/freebsd-11-stable/lib/libc/stdio/
H A Dflags.c98 o |= O_CLOEXEC;
H A Dfdopen.c83 if ((oflags & O_CLOEXEC) && _fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) {
H A Dfreopen.c120 if (oflags & O_CLOEXEC)
207 if ((oflags & O_CLOEXEC ? _fcntl(f, F_DUP2FD_CLOEXEC, wantfd) :
H A Dmktemp.c120 O_CLOEXEC)) != 0) {
/freebsd-11-stable/crypto/heimdal/lib/krb5/
H A Dcrypto-rand.c49 fd = open(seedfile, O_RDONLY | O_BINARY | O_CLOEXEC);
H A Dkeytab_keyfile.c206 c->fd = open (d->filename, O_RDONLY | O_BINARY | O_CLOEXEC, 0600);
333 fd = open (d->filename, O_RDWR | O_BINARY | O_CLOEXEC);
336 O_RDWR | O_BINARY | O_CREAT | O_EXCL | O_CLOEXEC, 0600);
/freebsd-11-stable/lib/libutil/
H A Duucplock.c79 if ((tmpfd = open(lcktmpname, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC,
92 if ((fd = open(lckname, O_RDONLY | O_CLOEXEC)) < 0)
136 if ((fd = open(lckname, O_RDWR | O_CLOEXEC)) < 0)
H A Dlogin_auth.c101 if ((fd = open(file, O_RDONLY | O_CLOEXEC)) < 0)
/freebsd-11-stable/contrib/libarchive/libarchive/
H A Darchive_random.c65 #ifndef O_CLOEXEC
66 #define O_CLOEXEC 0 macro
207 fd = open(RANDOMDEV, O_RDONLY | O_CLOEXEC, 0);
H A Darchive_write_open_filename.c55 #ifndef O_CLOEXEC
56 #define O_CLOEXEC 0 macro
144 flags = O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_CLOEXEC;
/freebsd-11-stable/lib/libc/iconv/
H A Dcitrus_mmap.c62 if ((fd = _open(path, O_RDONLY | O_CLOEXEC)) == -1)
/freebsd-11-stable/contrib/apr/file_io/unix/
H A Dopen.c146 #ifdef O_CLOEXEC
150 oflags |= O_CLOEXEC;
182 #ifdef O_CLOEXEC
200 #ifdef O_CLOEXEC
/freebsd-11-stable/usr.bin/find/
H A Dmain.c155 if ((dotfd = open(".", O_RDONLY | O_CLOEXEC, 0)) < 0)
/freebsd-11-stable/contrib/openbsm/compat/
H A Dpidfile.h129 #ifdef O_CLOEXEC
130 O_WRONLY | O_CREAT | O_TRUNC | O_NONBLOCK | O_CLOEXEC, mode);
154 #ifndef O_CLOEXEC
/freebsd-11-stable/tests/sys/file/
H A Ddup_test.c41 * Test #24: check if dup3(O_CLOEXEC) works.
42 * Test #25: check if dup3(O_CLOEXEC) returned a fd we asked for.
43 * Test #26: check if dup3(O_CLOEXEC) set close-on-exec flag for duped fd.
47 * Test #30: check if dup3(O_CLOEXEC) fails if oldfd == newfd.
49 * Test #32: check if dup3(O_CLOEXEC) to a fd > current maximum number of
310 /* Does dup3(O_CLOEXEC) ever work? */
311 if ((fd2 = dup3(fd1, fd1 + 1, O_CLOEXEC)) < 0)
312 err(1, "dup3(O_CLOEXEC)");
313 printf("ok %d - dup3(O_CLOEXEC) works\n", ++test);
319 "no ok %d - dup3(O_CLOEXEC) did
[all...]
/freebsd-11-stable/contrib/unbound/compat/
H A Darc4random.c104 #ifdef O_CLOEXEC
105 flags |= O_CLOEXEC;
113 #ifndef O_CLOEXEC
H A Dgetentropy_solaris.c186 #ifdef O_CLOEXEC
187 flags |= O_CLOEXEC;
195 #ifndef O_CLOEXEC
/freebsd-11-stable/contrib/llvm-project/lldb/source/Host/posix/
H A DPipePosix.cpp92 if (::pipe2(m_fds, (child_processes_inherit) ? 0 : O_CLOEXEC) == 0)
158 flags |= O_CLOEXEC;
179 flags |= O_CLOEXEC;
/freebsd-11-stable/lib/libc/locale/
H A Dldpart.c90 if ((fd = _open(filename, O_RDONLY | O_CLOEXEC)) < 0)

Completed in 136 milliseconds

12345