O_EXCL
open(to, O_CREAT | O_EXCL | O_TRUNC | O_WRONLY, 0)) < 0) {
if ((fd = open(arcn->name, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL,
if ((f = open(fname, O_WRONLY|O_CREAT|O_EXCL, 0666)) < 0)
if (flags & O_EXCL)
ret = fcc_open(context, id, &fd, O_RDWR | O_CREAT | O_EXCL | O_BINARY | O_CLOEXEC, 0600);
O_WRONLY | O_CREAT | O_EXCL | O_BINARY | O_CLOEXEC, 0600);
fd = open (d->filename, O_RDWR | O_CREAT | O_EXCL | O_BINARY | O_CLOEXEC, 0600);
O_RDWR | O_BINARY | O_CREAT | O_EXCL | O_CLOEXEC, 0600);
fd = open(template, O_RDWR | O_CREAT | O_EXCL, 0600);
if (flags & O_EXCL)
fd = open(fname, O_WRONLY|O_CREAT|O_EXCL|O_APPEND, 0644);
flags = O_CREAT | O_EXCL | O_RDWR | O_BINARY | O_CLOEXEC;
fd = THREEPARAMOPEN(pathname, O_RDWR | O_CREAT | O_EXCL | O_BINARY, 0600);
fd = THREEPARAMOPEN(db->lock->filename,O_RDWR | O_CREAT | O_EXCL,
db = dbopen(filename, O_RDWR | O_CREAT | O_EXCL, 0600, DB_BTREE, &btinfo);
lf = THREEPARAMOPEN(lockfilename, O_RDWR | O_CREAT | O_EXCL, 0600);
retval = open_db(context, dbc, O_RDWR | O_CREAT | O_EXCL, 0600, &dbc->db);
(O_CREAT | O_EXCL | O_EXLOCK | O_NONBLOCK | O_RDONLY | \
open(path, O_CREAT|O_EXCL|O_RDWR|O_BINARY, 0600)) >= 0)
fd = open(path, O_CREAT|O_EXCL|O_RDWR, S_IRUSR|S_IWUSR);
flags |= O_EXCL;
if ((fd = open(nstatefile, O_CREAT|O_WRONLY|O_EXCL, 0600)) == -1) {
(O_CREAT | O_EXCL | O_EXLOCK | O_NOFOLLOW | O_NONBLOCK | \
if (flags & ~(O_CREAT|O_EXCL)) {
if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT |
O_EXCL) || ni->dev != sb.st_dev ||
if ((o & O_EXCL) != 0 && m == O_RDONLY) {
o |= O_EXCL;
oflags |= O_CREAT | O_EXCL | O_RDWR;
ATF_CHECK(dbm_open(path, O_RDONLY | O_CREAT | O_EXCL, 0755) == NULL);
fd[i] = open(fn, O_CREAT|O_EXCL|O_EXLOCK|O_CLOEXEC, 0644);
session_file = openat(rt_dir_prefix, xdg_session_file, O_CREAT | O_EXCL, RUNTIME_DIR_MODE);
{ O_EXCL, PS_FST_FFLAG_EXCL },
O_WRONLY | O_CREAT | O_EXCL, S_IWUSR | S_IRUSR)) < 0)
*fd = open(newname, O_WRONLY | O_CREAT | O_EXCL, 0666);
#define FLAGS O_RDWR|O_EXLOCK|O_EXCL|O_CREAT
ofd = open(core, O_WRONLY | O_CREAT | O_EXCL, 0600);
fd = open(path, O_WRONLY | O_CREAT | O_EXCL, 0700);
fd = open(fname, O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0600);
fd = open(fname, O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0600);
fd = open(dirfile, O_RDWR|O_CREAT|O_EXCL, 0666);
fd = open(modefile, O_RDWR|O_CREAT|O_EXCL, 0666);
bsd_flags |= O_EXCL;
if (flags & O_EXCL)
if (flags & O_EXCL)
if (fmode & O_EXCL) {
if (fmode & O_EXCL) {
if ((fmode & O_EXCL) != 0) {
fmode |= O_EXCL;
if (NFS_ISV34(dvp) && (fmode & O_EXCL) &&
fmode &= ~O_EXCL;
} else if (NFS_ISV34(dvp) && (fmode & O_EXCL)) {
if (uflags & O_EXCL)
fmode = FFLAGS(O_WRONLY | O_CREAT | O_TRUNC | O_EXCL);
e = flags & O_EXCL ? 1 : 0;
e = flags & O_EXCL ? -1 : 0;
flags |= O_EXCL;
{ O_EXCL, KF_FLAG_EXCL },
if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) {
if ((flags & (O_CREAT | O_EXCL)) ==
(O_CREAT | O_EXCL))
if ((uap->oflag & ~(O_CREAT | O_EXCL)) != 0)
if ((uap->oflag & ~(O_CREAT | O_EXCL)) != 0)
if ((flags & ~(O_ACCMODE | O_CREAT | O_EXCL | O_TRUNC | O_CLOEXEC |
else if ((flags & (O_CREAT | O_EXCL)) ==
(O_CREAT | O_EXCL))
if ((fmode & (O_CREAT | O_EXCL | O_DIRECTORY)) == (O_CREAT |
O_EXCL | O_DIRECTORY) ||
if ((fmode & O_EXCL) != 0)
if (fmode & O_EXCL)
if (error == 0 && (fmode & O_EXCL) != 0 &&
if (fmode & O_EXCL) {
if ((fmode & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
if (xrcd && cmd.oflags & O_EXCL) {
EXPECT_EQ(-1, open(FULLPATH, O_CREAT | O_EXCL, mode));
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
EXPECT_EQ(-1, open(FULLPATH, O_CREAT | O_EXCL, mode));
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
EXPECT_EQ(-1, open(FULLPATH, O_CREAT | O_EXCL, mode));
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
fd = open(FULLPATH, O_CREAT | O_EXCL, 0644);
ASSERT_EQ(-1, open(FULLPATH, O_CREAT | O_EXCL, 0644));
test_ok(O_WRONLY | O_EXCL, O_WRONLY);
if ((fd = open(filename, O_RDWR|O_CREAT|O_EXCL, mode)) < 0)
if ((fd = open(filename, O_RDWR|O_CREAT|O_EXCL, mode)) < 0)
mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
int fd = open(path, O_RDWR|O_EXCL);
fd = open(SYSCTLBAKFILE, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL,
fd = open(SYSCTLBAKFILE, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL,
fd = shm_open(path, O_CREAT|O_EXCL|O_RDWR, 0777);
fd = shm_open(test_path, O_CREAT | O_EXCL | O_RDWR, 0777);
shm_open_should_fail(test_path, O_RDONLY|O_CREAT|O_EXCL,
desc = shm_open(test_path, O_EXCL | O_CREAT | O_RDWR, 0600);
ksem_open_should_fail(TEST_PATH, O_CREAT | O_EXCL, 0777, 1, EEXIST);
if (ksem_open(&id, TEST_PATH, O_CREAT | O_EXCL, 0777, 1) < 0) {
s = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0777, 0);
s2 = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0777, 0);
error = open(fd_list[i].fd_name, O_CREAT | O_EXCL, fd_list[i].fd_mode);
O_EXCL, 0644)) != -1)
flags = O_WRONLY | O_CREAT | O_EXCL;
flags &= ~O_EXCL;
out = open(outfile, O_WRONLY | O_CREAT | O_EXCL, 0600);
zfd = open(outfile, O_WRONLY|O_CREAT|O_EXCL, 0600);
if ((fd = open(tracefile, O_CREAT | O_EXCL | O_WRONLY,
fd = open(fname, O_RDWR|O_EXCL|O_CREAT|O_APPEND);
if ((tifd = open(TMPINNAME, O_EXCL | O_CREAT | O_WRONLY, 0666)) < 0)
flags |= O_EXCL;
fd = open(tbuf, O_RDWR|O_CREAT|O_EXCL, 0660);
if ((f = open(tmp, O_RDWR|O_CREAT|O_TRUNC|O_EXCL, 0600)) < 0) {
O_CREAT | O_WRONLY | O_EXCL, mode);
fd = openat(d, tmpfile, O_WRONLY | O_CREAT | O_EXCL, mode);
if ((fd = open(tempfname, O_CREAT | O_EXCL | O_RDWR, 0600)) == -1) {
fd = open(fname, O_CREAT | O_TRUNC | O_EXCL | O_WRONLY,
flags &= ~O_EXCL;
flags = O_CREAT | O_WRONLY | O_TRUNC | O_EXCL;
fd = open(fn, O_WRONLY | O_TRUNC | O_EXCL | O_CREAT, 0644);
fd = open(pidfile, O_WRONLY|O_CREAT|O_EXCL, 0644);
fd = open(file, O_CREAT|O_EXCL|O_WRONLY, FILMOD);
f = open(n, O_WRONLY | O_EXCL | O_CREAT, FILMOD);
destfd = openat(rootfd, path, O_RDWR | O_CREAT | O_EXCL,
O_RDWR|O_EXCL, PERM_INSECURE, DB_HASH, &openinfo);
O_RDWR|O_EXCL, PERM_SECURE, DB_HASH, &openinfo);
O_RDWR|O_CREAT|O_EXCL, PERM_INSECURE, DB_HASH, &openinfo);
O_RDWR|O_CREAT|O_EXCL, PERM_SECURE, DB_HASH, &openinfo);
O_WRONLY|O_CREAT|O_EXCL, PERM_INSECURE)) < 0)
if ((to_fd = open(to, O_WRONLY|O_CREAT|O_EXCL, mode)) < 0)
db = dbopen(tname, O_RDWR | O_CREAT | O_EXCL,
if ((dbp = open_db(map, O_RDWR|O_EXLOCK|O_EXCL|O_CREAT)) == NULL)