O_CLOEXEC
cwdfd = open(".", O_RDONLY | O_CLOEXEC);
#if !defined(O_CLOEXEC) || !defined(F_DUPFD_CLOEXEC)
#if !defined(O_CLOEXEC) || !defined(F_DUPFD_CLOEXEC)
#if !defined(O_CLOEXEC) || !defined(F_DUPFD_CLOEXEC)
#if !defined(O_CLOEXEC) || !defined(F_DUPFD_CLOEXEC)
#ifdef O_CLOEXEC
#define O_CLOEXEC_MAYBE O_CLOEXEC
if ((fd = _open(path, O_RDONLY | O_CLOEXEC)) == -1)
if ((t->bt_fd = _open(fname, flags | O_CLOEXEC, mode)) < 0)
if ((fd = mkostemp(path, O_CLOEXEC)) != -1)
O_RDONLY | O_RDWR | O_SHLOCK | O_SYNC | O_TRUNC | O_CLOEXEC)
if ((hashp->fp = _open(file, flags | O_CLOEXEC, mode)) == -1)
if ((hashp->fp = mkostemp(path, O_CLOEXEC)) != -1) {
if (fname != NULL && (rfd = _open(fname, flags | O_CLOEXEC, mode)) < 0)
if ((flags & ~(O_CLOEXEC | O_CLOFORK)) != 0) {
fdflags = ((flags & O_CLOEXEC) != 0 ? FD_CLOEXEC : 0) |
if (fd < 0 && (newfd = _open(path, O_RDONLY | O_CLOEXEC, 0)) < 0)
(sp->fts_rfd = _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0)
if ((p->fts_symfd = _open(".", O_RDONLY | O_CLOEXEC,
if ((p->fts_symfd = _open(".", O_RDONLY | O_CLOEXEC,
if ((fd = _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0)
fd = _open(*db_p, O_RDONLY | O_CLOEXEC, 0);
fd = _open(name, O_RDONLY | O_CLOEXEC, 0);
fd = _open(name, O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC);
if (pipe2(pdes, O_CLOEXEC) < 0)
input = output = _open(_PATH_TTY, O_RDWR | O_CLOEXEC);
(fd = _open(_PATH_CONSOLE, O_WRONLY|O_NONBLOCK|O_CLOEXEC, 0)) >= 0) {
fd = _open(file, O_WRONLY|O_APPEND|O_SHLOCK|O_CLOEXEC);
if ((fd = _open(file, O_CREAT|O_WRONLY|O_EXLOCK|O_CLOEXEC, 0644)) == -1)
db = dbopen(fname, O_RDONLY|O_SHLOCK|O_CLOEXEC, 0, DB_HASH, NULL);
db = dbopen(fname, O_RDWR|O_CREAT|O_EXLOCK|O_CLOEXEC, 0644, DB_HASH, NULL);
if (pipe2(pdesw, O_CLOEXEC) < 0)
if (pipe2(pdes, O_CLOEXEC) < 0) {
fd = _open(outname, O_CREAT|O_TRUNC|O_WRONLY|O_CLOEXEC, 0666);
log = _open("gmon.log", O_CREAT|O_TRUNC|O_WRONLY|O_CLOEXEC, 0664);
if ((fd = _open(filename, O_RDONLY | O_CLOEXEC)) < 0)
if ((fd = _open(path, O_RDONLY | O_CLOEXEC)) == -1) {
if ((oflags & O_CLOEXEC) != 0 &&
o |= O_CLOEXEC;
if ((oflags & O_CLOEXEC) != 0 &&
if (oflags & O_CLOEXEC) {
O_EXLOCK | O_SYNC | O_CLOEXEC | O_CLOFORK)) != 0) {
fd = _open("/dev/random", O_RDONLY|O_CLOEXEC, 0);
if ((fd = _open(path, O_RDONLY | O_CLOEXEC)) == -1) {
nvmm_fd = open("/dev/nvmm", O_RDONLY | O_CLOEXEC);
nvmm_fd = open("/dev/nvmm", O_WRONLY | O_CLOEXEC);
oflag |= O_CLOEXEC;
fd = __sys_open(path, O_RDWR | O_CLOEXEC);
fd = open(buf, O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC, 0666);
lockfd = flopen(group_file, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0);
if ((fd = open(file, O_RDONLY | O_CLOEXEC)) < 0)
else if ((r = open(login_dbarray[0], O_RDONLY | O_CLOEXEC)) >= 0)
O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NONBLOCK, mode);
fd = open(path, O_RDONLY | O_CLOEXEC);
lockfd = flopen(masterpasswd, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0);
if ((fd = open(lckname, O_RDWR | O_CLOEXEC)) < 0)
if ((tmpfd = open(lcktmpname, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC,
if ((fd = open(lckname, O_RDONLY | O_CLOEXEC)) < 0)
fd = open(rpath, O_RDONLY | O_CLOEXEC);
if ((fd = open(ld_elf_hints_path, O_RDONLY | O_CLOEXEC)) == -1)
if ((fd = open(path, O_RDONLY | O_CLOEXEC)) == -1) {
fd = openat(dirfd, name, O_RDONLY | O_CLOEXEC);
fd = open(PATH_DEVCTL, O_RDONLY | O_CLOEXEC);
pf_fd = open(pidfile, O_RDONLY | O_CLOEXEC);
fd = get_unused_fd_flags(O_CLOEXEC);
fence_state->fd = get_unused_fd_flags(O_CLOEXEC);
fd = get_unused_fd_flags(O_CLOEXEC);
int fd = get_unused_fd_flags(O_CLOEXEC);
out_fence_fd = get_unused_fd_flags(O_CLOEXEC);
f_flags |= O_CLOEXEC;
#define DRM_CLOEXEC O_CLOEXEC
if (flags & O_CLOEXEC) {
if (!(flags & O_CLOEXEC))
if (!(flags & O_CLOEXEC))
if ((uap->flags & ~(O_CLOEXEC | O_CLOFORK | O_NONBLOCK)) != 0)
if (flags & O_CLOEXEC)
if (flags & O_CLOEXEC)
oflags |= O_CLOEXEC;
if (oflags & O_CLOEXEC)
oflags |= O_CLOEXEC;
if (oflags & O_CLOEXEC) {
if (oflags & O_CLOEXEC)
if (uap->flags & O_CLOEXEC)
if ((fd2 = dup3(fd1, fd1 + 1, O_CLOEXEC)) < 0)
if (dup3(fd1, fd1, O_CLOEXEC) != -1)
if ((fd2 = dup3(fd1, rlp.rlim_cur + 1, O_CLOEXEC)) >= 0)
flags |= O_CLOEXEC;
flags |= O_CLOEXEC;
dflags |= O_CLOEXEC;
flags |= O_CLOEXEC;
.clo_flags = O_CLOFORK | O_CLOEXEC,
.clo_flags = O_CLOEXEC,
.clo_flags = O_CLOFORK | O_CLOEXEC,
.clo_flags = O_CLOEXEC,
.clo_flags = O_CLOFORK | O_CLOEXEC,
.clo_flags = O_CLOEXEC,
.clo_flags = O_CLOFORK | O_CLOEXEC,
.clo_flags = O_CLOEXEC,
if (!oclo_dup3("dup3(): O_NONBLOCK|O_CLOXEC", O_NONBLOCK | O_CLOEXEC)) {
if (!oclo_pipe2("pipe2(): O_SYNC|O_CLOXEC", O_SYNC | O_CLOEXEC)) {
fd1 = open(src, O_RDONLY|O_CLOEXEC);
fd2 = open(tmp, O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC, 0644);
lkfd = open(lkpath, O_RDWR | O_CREAT | O_CLOEXEC, 0644);
StatsFd = open(StatsFilePath, O_RDWR|O_CREAT|O_CLOEXEC, 0644);
LockFd = open(StatsLockPath, O_RDWR|O_CREAT|O_NOFOLLOW|O_CLOEXEC,
if (pipe2(fds, O_CLOEXEC) < 0)
nullfd = open("/dev/null", O_RDWR | O_CLOEXEC);
if ((dotfd = open(".", O_RDONLY | O_CLOEXEC, 0)) < 0)
autofs_fd = open(AUTOFS_PATH, O_RDWR | O_CLOEXEC);
autofs_fd = open(AUTOFS_PATH, O_RDWR | O_CLOEXEC);
outfd = open(outfn, O_CREAT | O_WRONLY | O_APPEND | O_CLOEXEC, 0600);
O_CLOEXEC,
if (pipe2(signalpipe, O_CLOEXEC) != 0) {