/freebsd-10-stable/lib/libc/gen/ |
H A D | dup3.c | 48 if (flags & ~O_CLOEXEC) { 53 how = (flags & O_CLOEXEC) ? F_DUP2FD_CLOEXEC : F_DUP2FD;
|
H A D | pututxline.c | 50 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-10-stable/lib/libc/tests/stdio/ |
H A D | mkostemp_test.c | 74 (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-10-stable/contrib/netbsd-tests/lib/libc/sys/ |
H A D | t_dup.c | 82 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 D | t_pipe2.c | 68 if (flags & O_CLOEXEC) { 141 err = pipe2(filedes, O_CLOEXEC); 166 run(O_CLOEXEC);
|
/freebsd-10-stable/crypto/heimdal/lib/krb5/ |
H A D | crypto-rand.c | 49 fd = open(seedfile, O_RDONLY | O_BINARY | O_CLOEXEC);
|
H A D | keytab_keyfile.c | 206 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-10-stable/lib/libc/stdio/ |
H A D | flags.c | 98 o |= O_CLOEXEC;
|
H A D | fdopen.c | 83 if ((oflags & O_CLOEXEC) && _fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) {
|
H A D | freopen.c | 120 if (oflags & O_CLOEXEC) 207 if ((oflags & O_CLOEXEC ? _fcntl(f, F_DUP2FD_CLOEXEC, wantfd) :
|
H A D | mktemp.c | 120 O_CLOEXEC)) != 0) {
|
/freebsd-10-stable/lib/libutil/ |
H A D | uucplock.c | 79 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 D | login_auth.c | 101 if ((fd = open(file, O_RDONLY | O_CLOEXEC)) < 0)
|
/freebsd-10-stable/contrib/libarchive/libarchive/ |
H A D | archive_random.c | 65 #ifndef O_CLOEXEC 66 #define O_CLOEXEC 0 macro 207 fd = open(RANDOMDEV, O_RDONLY | O_CLOEXEC, 0);
|
H A D | archive_write_open_filename.c | 55 #ifndef O_CLOEXEC 56 #define O_CLOEXEC 0 macro 144 flags = O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_CLOEXEC;
|
H A D | archive_util.c | 66 #ifndef O_CLOEXEC 67 #define O_CLOEXEC 0 macro 437 fd = open(temp_name.s, O_RDWR|O_CLOEXEC|O_TMPFILE|O_EXCL, 0600); 528 fd = open(template, O_CREAT | O_EXCL | O_RDWR | O_CLOEXEC, 559 * We have to set the flag if the platform does not provide O_CLOEXEC 563 * descriptor even if the platform seemingly provides O_CLOEXEC or
|
/freebsd-10-stable/lib/libc/iconv/ |
H A D | citrus_mmap.c | 60 if ((fd = open(path, O_RDONLY | O_CLOEXEC)) == -1)
|
/freebsd-10-stable/contrib/apr/file_io/unix/ |
H A D | open.c | 146 #ifdef O_CLOEXEC 150 oflags |= O_CLOEXEC; 182 #ifdef O_CLOEXEC 200 #ifdef O_CLOEXEC
|
/freebsd-10-stable/usr.bin/find/ |
H A D | main.c | 154 if ((dotfd = open(".", O_RDONLY | O_CLOEXEC, 0)) < 0)
|
/freebsd-10-stable/tests/sys/file/ |
H A D | dup_test.c | 41 * 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-stable/contrib/openbsm/compat/ |
H A D | pidfile.h | 129 #ifdef O_CLOEXEC 130 O_WRONLY | O_CREAT | O_TRUNC | O_NONBLOCK | O_CLOEXEC, mode); 154 #ifndef O_CLOEXEC
|
/freebsd-10-stable/contrib/unbound/compat/ |
H A D | getentropy_solaris.c | 186 #ifdef O_CLOEXEC 187 flags |= O_CLOEXEC; 195 #ifndef O_CLOEXEC
|
/freebsd-10-stable/lib/libc/locale/ |
H A D | ldpart.c | 90 if ((fd = _open(filename, O_RDONLY | O_CLOEXEC)) < 0)
|
/freebsd-10-stable/contrib/zlib/ |
H A D | gzlib.c | 102 #ifdef O_CLOEXEC 147 #ifdef O_CLOEXEC 230 #ifdef O_CLOEXEC 231 (cloexec ? O_CLOEXEC : 0) |
|
/freebsd-10-stable/contrib/ntp/sntp/ |
H A D | sntp-opts.c | 843 #ifndef O_CLOEXEC 844 # define O_CLOEXEC 0 macro 846 mode.file_flags = O_CLOEXEC; 870 #ifndef O_CLOEXEC 871 # define O_CLOEXEC 0 macro 873 mode.file_flags = O_CLOEXEC; 895 #ifndef O_CLOEXEC 896 # define O_CLOEXEC 0 macro 898 mode.file_flags = O_CLOEXEC;
|