[PATCH] manual: Add Descriptor-Relative Access section

Michael Kerrisk (man-pages) mtk.manpages@gmail.com
Tue May 12 07:33:57 GMT 2020


Hi Florian,

[Just by the way, I'm always happy to have you CC me directly on any
patch to the glibc manual. It increases the chances that I'll see the
mail and be able to take a look and comment. And I often I learn new
things from you patches :-).]

On Tue, 12 May 2020 at 09:19, Florian Weimer <fw@deneb.enyo.de> wrote:
>
> * Michael Kerrisk:
>
> > One more thought...
> >
> >> +@itemize @bullet
> >> +@item
> >> +It can be a file descriptor referring to a directory.  Such a descriptor
> >> +can be created explicitly using the @code{open} function, with or
> >> +without the @code{O_DIRECTORY} flag.
> >
> > Is it worth mentioning O_PATH here?
>
> Do you mean like this?
>
> +It can be a file descriptor referring to a directory.  Such a descriptor
> +can be created explicitly using the @code{open} function, with or
> +without the @code{O_DIRECTORY} amd @code{O_PATH} flags.

(s/amd/and/)

I'd be inclined to separate out the discussion of O_PATH and
O_DIRECTORY, which latter is I think is largely irrelevant to the
discussion of dirfds (correct me if I'm wrong) so that I'm not sure
it's even necessary to mention O_DIRECTORY.

And then in the discussion of O_PATH, you could more explicitly say
that the directory can be opened with either O_RDONLY or O_PATH.

> And also mention that the file name argument must be non-empty in this
> case?

Yes, I suppose that would also be helpful.

Thanks,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/


More information about the Libc-alpha mailing list