Re: two questions on file modes Lassi Kortela 26 Jul 2020 20:33 UTC

> The argument of Pareto 80/20 principle lowering the effort
> to implement SRFI 170 remains strong for adding port/fdes
> to these procedures.  Can you make a case that this is
> really useful, when every extra bit of effort adds up?

In general, operating on a file descriptor is always better than
operating on a pathname when you have the fd already open. It is faster
(avoids pathname lookup) and, much more importantly, it avoids race
conditions when the underlying file has been moved and your program is
accidentally using a stale pathname.

> The same is a strong argument for combining setting file
> and group ownership in one procedure, but I remain
> uncomfortable with keeping the name set-file-*owner*,
> although not by a great deal, seeing as how chown(1) works
> that way.  Or at least I frequently use that feature....

POSIX does indeed talk about "the group of a file" so your naming is in
line with the official terminology than mine. Then again POSIX chown()
changes both, as you say.