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

123

/freebsd-10.0-release/lib/libc/gen/
H A Ddup3.c48 if (flags & ~O_CLOEXEC) {
53 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);
H A Dopendir.c92 O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC)) == -1)
179 if ((fd2 = _openat(fd, ".", O_RDONLY | O_CLOEXEC)) == -1) {
/freebsd-10.0-release/tools/regression/lib/libc/stdio/
H A Dtest-mkostemp.c72 (oflags & O_CLOEXEC ? FD_CLOEXEC : 0)) {
158 test_one(O_CLOEXEC);
160 test_one(O_APPEND | O_CLOEXEC);
/freebsd-10.0-release/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);
H A Dkrb5_locl.h212 #ifndef O_CLOEXEC
213 #define O_CLOEXEC 0 macro
/freebsd-10.0-release/lib/libc/stdio/
H A Dflags.c98 o |= O_CLOEXEC;
H A Dfdopen.c82 if ((oflags & O_CLOEXEC) && _fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) {
H A Dfreopen.c119 if (oflags & O_CLOEXEC)
197 if ((oflags & O_CLOEXEC ? _fcntl(f, F_DUP2FD_CLOEXEC, wantfd) :
H A Dmktemp.c120 O_CLOEXEC)) != 0) {
/freebsd-10.0-release/contrib/libarchive/libarchive/
H A Darchive_write_open_filename.c55 #ifndef O_CLOEXEC
56 #define O_CLOEXEC 0 macro
143 flags = O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_CLOEXEC;
H A Darchive_util.c53 #ifndef O_CLOEXEC
54 #define O_CLOEXEC 0 macro
447 fd = open("/dev/random", O_RDONLY | O_CLOEXEC);
462 fd = open(temp_name.s, O_CREAT | O_EXCL | O_RDWR | O_CLOEXEC,
479 * We have to set the flag if the platform does not provide O_CLOEXEC
483 * descriptor even if the platform seemingly provides O_CLOEXEC or
/freebsd-10.0-release/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)
H A Dpidfile.c76 fd = open(path, O_RDONLY | O_CLOEXEC);
127 O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NONBLOCK, mode);
/freebsd-10.0-release/lib/libc/iconv/
H A Dcitrus_mmap.c60 if ((fd = open(path, O_RDONLY | O_CLOEXEC)) == -1)
/freebsd-10.0-release/contrib/apr/file_io/unix/
H A Dopen.c138 #ifdef O_CLOEXEC
142 oflags |= O_CLOEXEC;
174 #ifdef O_CLOEXEC
192 #ifdef O_CLOEXEC
/freebsd-10.0-release/usr.bin/find/
H A Dmain.c154 if ((dotfd = open(".", O_RDONLY | O_CLOEXEC, 0)) < 0)
/freebsd-10.0-release/contrib/openbsm/compat/
H A Dpidfile.h130 #ifdef O_CLOEXEC
131 O_WRONLY | O_CREAT | O_TRUNC | O_NONBLOCK | O_CLOEXEC, mode);
155 #ifndef O_CLOEXEC
/freebsd-10.0-release/tools/regression/file/dup/
H A Ddup.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-10.0-release/lib/libc/locale/
H A Dldpart.c90 if ((fd = _open(filename, O_RDONLY | O_CLOEXEC)) < 0)
/freebsd-10.0-release/lib/libkvm/
H A Dkvm.c169 if ((kd->pmfd = open(mf, flag | O_CLOEXEC, 0)) < 0) {
190 kd->vmfd = open(_PATH_DEVNULL, O_RDONLY | O_CLOEXEC);
193 if ((kd->vmfd = open(_PATH_KMEM, flag | O_CLOEXEC)) <
206 if ((kd->nlfd = open(uf, O_RDONLY | O_CLOEXEC, 0)) < 0) {
/freebsd-10.0-release/lib/libz/
H A Dgzlib.c102 #ifdef O_CLOEXEC
147 #ifdef O_CLOEXEC
230 #ifdef O_CLOEXEC
231 (cloexec ? O_CLOEXEC : 0) |
/freebsd-10.0-release/lib/libc/gmon/
H A Dgmon.c166 fd = _open(outname, O_CREAT|O_TRUNC|O_WRONLY|O_CLOEXEC, 0666);
172 log = _open("gmon.log", O_CREAT|O_TRUNC|O_WRONLY|O_CLOEXEC, 0664);

Completed in 383 milliseconds

123