Operations on file descriptors in addition to pathnames Lassi Kortela (11 Dec 2019 12:43 UTC)
Re: Operations on file descriptors in addition to pathnames Marc Feeley (12 Dec 2019 12:36 UTC)
Re: Operations on file descriptors in addition to pathnames Lassi Kortela (12 Dec 2019 12:59 UTC)
Re: Operations on file descriptors in addition to pathnames Lassi Kortela (12 Dec 2019 13:21 UTC)
Re: Operations on file descriptors in addition to pathnames Lassi Kortela (12 Dec 2019 13:27 UTC)
Re: Operations on file descriptors in addition to pathnames Lassi Kortela (18 Dec 2019 20:52 UTC)

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