Re: Operations on file descriptors in addition to pathnames
Marc Feeley 12 Dec 2019 12:36 UTC
> On Dec 12, 2019, at 2:46 AM, Duy Nguyen <xxxxxx@gmail.com> wrote:
>
> Are there good reasons to? I think these are mostly to prevent races
> or maybe when path resolution becomes too expensive.
Also needed to access files whose path exceeds PATH_MAX. I’m not advodating anything concerning SRFI 170… just adding an important reason why openat exists. Gambit uses openat, unlinkat, etc (if available) to implement open-file, delete-file, etc that work regardless of the length of the path.
Marc