From: John Cowan <>
Date: Friday, August 09, 2019 9:50 AM

On Fri, Aug 9, 2019 at 3:42 AM Lassi Kortela <> wrote:

[ Processes and I/O. ]
> You shouldn't be changing [mode, owner, etc.] for a file whose identity you dont know.

The point of these syscalls (fchmod, fchown, fchdir, etc.) is to use them in situations where you opened a known file. Using the fd instead of the path prevents things like having a directory disappear from underneath you during the lifetime of the process if that directory's path is renamed.

I see the force of that, but I don't think it meets the 80/20 rule.  These were file-only for a looooong time before their fd equivalents were introduced, and "when in doubt, leave it out".   I'm open to being convinced otherwise, though.

There's also perhaps an efficiency argument for them, but I thing the 80/20 rule says to cut ports as arguments for these 4, but as previously discussed not truncate or file-info .  I'll hold off on that for a bit to see if anyone else has a strong opinion on it.

[ Stuff we all agree on. ]

On Fri, Aug 9, 2019 at 8:52 AM <> wrote:

I'll work on that next, forwarding to the list anything where I'm not sure.  Right now that includes dup->fdes, as I understand it, dup and dup2 are only needed in the context of forking.


And I forgot fifos, you don't need to make or know about them unless you're communicating with another process, right?

In 3.5 Process state, do we keep pid?  parent-pid goes, I think.

Yes to both.  Pid is important for logging, temp files, etc.

Ah, of course, and I can sort of see that for parent-pid, logging "who's responsible for my existance".

[ We will only be nice, etc. ]
[...] whereas line discipline stuff, however we do it, belongs in this SRFI.

Minimally.  I like my just-three-procedures version, which is what's needed to write full-fledged CLIs.  TUIs should use the character grid model.

As someone who spent half his professional career in the 1980s on many difference versions of EMACS, I don't like them, at least with second instead of millisecond or 1/10 second time out granularity (and they're hairy enough in areas I don't know that I'm punting on implementing them in Chibi, at least for now).

Thus, and for simplicity's sake, I strongly advocate exposing the calls that these will use to simply set the line discipline to raw, maybe rare (completely left out of the SRFI, do we want it??), no echo and echo (orthogonal, I think), and cooked mode.

- Harold