[PATCH] manual: Document the O_TMPFILE flag
Jonathan Nieder
jrnieder@gmail.com
Fri Nov 3 21:58:00 GMT 2017
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
More information about the Libc-alpha
mailing list