O_EXLOCK
{ "exlock", O_EXLOCK, C_IFLAG|C_OFLAG },
if ((fd = open(hname, O_WRONLY | O_CREAT | O_TRUNC | O_EXLOCK, 0600)) != -1) {
#ifndef O_EXLOCK
#define IGNFLAGS (O_ACCMODE|O_RDONLY|O_WRONLY|O_RDWR|O_SHLOCK|O_EXLOCK| \
(O_CREAT | O_EXCL | O_EXLOCK | O_NONBLOCK | O_RDONLY | \
if ((fd = open(file, O_CREAT|O_WRONLY|O_EXLOCK|O_CLOEXEC, 0644)) == -1)
db = dbopen(fname, O_RDWR|O_CREAT|O_EXLOCK|O_CLOEXEC, 0644, DB_HASH, NULL);
(oflags & ~(O_APPEND | O_DIRECT | O_SHLOCK | O_EXLOCK | O_SYNC |
#ifdef O_EXLOCK
opts |= O_EXLOCK;
#ifndef O_EXLOCK
if ((mbfd = open(path, O_APPEND|O_WRONLY|O_EXLOCK|O_NOFOLLOW,
(mbfd = open(path, O_APPEND|O_CREAT|O_WRONLY|O_EXLOCK|O_EXCL,
lfd = open(file, O_RDONLY|O_EXLOCK, 0);
fd = open(rawname, O_RDONLY | O_EXLOCK);
{ SUN_EXLOCK, O_EXLOCK },
nmode |= ((smode & 0x0100) ? O_EXLOCK : 0);
{ SUN_EXLOCK, O_EXLOCK },
r |= ((lf & 0x0100) ? O_EXLOCK : 0);
r |= ((q & 0x0100) ? O_EXLOCK : 0);
if (flags & (O_EXLOCK | O_SHLOCK)) {
if (flags & O_EXLOCK)
#define O_MASK (O_ACCMODE|O_NONBLOCK|O_APPEND|O_SHLOCK|O_EXLOCK|\
O_SHLOCK, O_EXLOCK,
O_SHLOCK, O_EXLOCK,
#ifndef O_EXLOCK
oi.dbflags = O_RDWR | O_CREAT | O_EXLOCK;
oi.dbflags = O_RDWR | O_CREAT | O_EXLOCK;
if ((fd = open(argv[0], O_RDWR | O_EXLOCK, 0)) < 0)
if ((fd = open(tty, O_RDWR | O_NONBLOCK | O_EXLOCK, 0)) < 0)
fd = open(new_key_file, O_WRONLY|O_TRUNC|O_CREAT|O_EXLOCK, 0600);
db_compat = dbopen(db_name_tmp, O_CREAT|O_EXCL|O_EXLOCK|O_RDWR|O_TRUNC,
db = dbopen(dbtemp, O_CREAT | O_EXLOCK | O_TRUNC | O_RDWR,
db = dbopen(filename, O_RDWR|O_CREAT|O_NDELAY|O_EXLOCK, 0644, DB_HASH,