On Sat, 25 Mar 2000, Jamie Lokier wrote:

> > > Why don't you just give O_NONE (value: 3) this behaviour?

> > Mostly, though, because I wanted to leave the O_RDWR/etc.
> > permission checks in the open() path, to avoid the possibility
> > of giving out descriptors to otherwise inaccessible files.
>
> O_NONE already does some kind of permission check -- you can only open
> a file that has read and write access.  You certainly can't open an
> inaccessible file.

That being the case, I'd rather that O_NONE just went away.  I
am unconvinced of its worth anyway.

> I don't think there would be many complaints if that were changed to
> read _or_ write.

The two options are basically orthogonal, though.  I don't see
any gain from combining them, especially when that just means
an extra fcntl(F_SETFD) in the cases I want deferred open for.

People who want both can specifc O_NONE|O_DEFEROPEN.

Or did I miss something?

Matthew.

Reply via email to