On Fri, Nov 22, 2019 at 12:04 PM <xxxxxx@ancell-ent.com> wrote:

Noticing the close-fdes mirror that wraps close(2) suggests we should change the name of one or both.

They aren't all that symmetrical.   Open-file can only open a resource with a name in the filesystem, whereas close-fdes can close any fd.  It's undefined what happens if you close a fdes that's part of a Scheme port, but some other SRFIs might need to deal in fd's, particularly the process SRFI.
 
While looking at the total set of flags that POSIX allows to be handed to open(2) (https://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html) none of the additional ones really lept out at me as warranting inclusion, except perhaps O_NONBLOCK, which I note is an option in Chibi Scheme's filesystem library.  Per POSIX:

O_NONBLOCK

This will take some thought.  It can't just be passed through blindly, because in a green-threads Scheme it would block the whole process. 
O_CLOEXEC
If set, the FD_CLOEXEC flag for the new file descriptor shall be set.

The process pre-SRFI says that any fd not explicitly mentioned in the make-process call is implicitly closed; I think whitelisting is a better approach.
O_NOFOLLOW
If path names a symbolic link, fail and set errno to [ELOOP].

I'm not sure what serious practical use this has, but since the SRFI is symbolic link aware, perhaps it should be added.

Perhaps it should.



John Cowan          http://vrici.lojban.org/~cowan        xxxxxx@ccil.org
Is not a patron, my Lord [Chesterfield], one who looks with unconcern
on a man struggling for life in the water, and when he has reached ground
encumbers him with help?        --Samuel Johnson