This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] manual: Document the O_TMPFILE flag
- From: Jonathan Nieder <jrnieder at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 3 Nov 2017 14:58:23 -0700
- Subject: Re: [PATCH] manual: Document the O_TMPFILE flag
- Authentication-results: sourceware.org; auth=none
- References: <20171103213714.8303C41F1E4EF@oldenburg.str.redhat.com>
Hi,
Florian Weimer wrote:
> --- a/manual/llio.texi
> +++ b/manual/llio.texi
> @@ -3478,6 +3478,25 @@ If set, the file will be created if it doesn't already exist.
[...]
> +@deftypevr Macro int O_TMPFILE
> +@standards{GNU, fcntl.h} If this flag is specified, functions in the
For the other flags there's a line break after the } here. I don't
know whether it matters.
> +@code{open} family create an unnamed temporary file in the directory
> +@var{filename}. The @code{O_TMPFILE} flag must be combined with
@var{filename} isn't defined here. How about "the named directory"?
> +@code{O_WRONLY} or @code{O_RDWR}, and the @var{mode} argument is
> +required. The file can later be given a name using @code{linkat}. To
> +prevent that, specify the @code{O_EXCL} flag at open time.
To prevent what? Can you describe an example scenario where O_EXCL
would be used?
> +
> +Not all kernels support this open flag. If this flag is unsupported,
> +the function call fails with an error of @code{EINVAL}. If the
> +underlying file system does not support the @code{O_TMPFILE} flag, an
> +@code{EOPNOTSUPP} error is the result.
> +
> +The @code{O_TMPFILE} flag is a GNU extension.
The rest looks good.
Thanks,
Jonathan