[PATCH] manual: Document the O_TMPFILE flag

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


On 11/04/2017 12:13 AM, Phil Blundell wrote:
> On Fri, 2017-11-03 at 23:51 +0100, Florian Weimer wrote:
>> +@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?
> 
> There's certainly something a bit jarring about that language.  I think
> this might just be because the reference manual is a relatively formal
> document and the use of the vague "that" as the object seems a bit
> wrong in that context.
> 
> But anyway, you could avoid this problem by rephrasing it into a single
> sentence:
> 
> "Unless @code{O_EXCL} was specified at open time, the file can later be
> given a name using @code{linkat}."

I really try to avoid “unless” because I assume it is often confusing.

> Or something.  But I also agree with the comment that it'd be useful to
> have a bit of explanation as to when this is a useful thing to do.

I added a bit more explanation.  As far as I'm concerned, the O_EXCL 
flag is a bit of a stretch, and I don't think it's useful.

I also attempted to improve the wording regarding the pathname argument.

Thanks,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tmpfile.patch
Type: text/x-patch
Size: 1922 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20171103/48479c58/attachment.bin>


More information about the Libc-alpha mailing list