[PATCH] manual: Document the O_TMPFILE flag

Florian Weimer fweimer@redhat.com
Fri Nov 3 22:51:00 GMT 2017


On 11/03/2017 10:58 PM, Jonathan Nieder wrote:
> 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.

Okay, I will add that here, too.

>> +@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"?

It is defined for the open functions.  I wasn't sure how to incorporate 
the fact that the pathname argument is overloaded without totally 
reorganizing how this information is presented.

>> +@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?

Giving a name using linkat.  Is this really unclear?

> The rest looks good.

Thanks.

Florian



More information about the Libc-alpha mailing list