[PATCH] manual: Add Descriptor-Relative Access section

Carlos O'Donell carlos@redhat.com
Tue May 12 03:22:32 GMT 2020


On 5/4/20 7:16 AM, Florian Weimer wrote:
> * Michael Kerrisk:
> 
>>> +@item
>>> +If a progrem wishes to access a directory tree which is being modified
>>> +concurrently, perhaps even by a different user on the system, the
>>> +program typically must avoid following symbolic links.  With POSIX
>>> +interfaces, this can be done using the @code{O_NOFOLLOW} flag
>>> +(@pxref{Open-time Flags}) or the @code{AT_SYMLINK_FOLLOW} flag
>>> +(described below), but these flags affect only the final component of a
>>> +file name (the basename).  Symbolic links in the parent directory part
>>> +are still followed.  Therefore, without directory-relative access, it is
>>> +necessary to use the @code{fchdir} function to change the working
>>> +directory (@pxref{Working Directory}) and use the basename for file
>>> +system access.  As explained before, this is not thread-safe.  Keeping a
>>> +file descriptor of the directory is also required to be able to return
>>
>> Maybe better: s/of/that refers to/
>>
>>> +to it later, so descriptor-based access is a natural fit.
>>
>> s/descriptor-relativebased/descriptor-relative/ ?
> 
> Thanks, we have now:
> 
> […]
> directory (@pxref{Working Directory}) and use the basename for file
> system access.  As explained before, this is not thread-safe.  Keeping a
> file descriptor that refers to the directory is also required to be able
> to return to it later, so descriptor-relative access is a natural fit.
> 
> 8<------------------------------------------------------------------8<

After much review I think that patchwork is working as intended here.

You must call your new patch v2 by changing the subject e.g. [PATCH v2] ...

All other comments on the thread are just that, comments on the patch.

-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list