From: John Cowan <xxxxxx@ccil.org>
Date: Wednesday, August 21, 2019 5:51 PM

[...]

I've also added (my view of) parent-pid, process-group, user-info:full-name, user-info:parsed-full-name (this shouldn't be a standalone procedure because it needs access to user-info:name),

Can't it get that by taking (user-info:name a-user-info-record) as an argument?  That does return the raw pw_gecos field.

and terminal stuff.  Without-interrupt-chars is gone; I don't think it's needed, just raw, cooked, and no-echo.  I also changed "tty" to "terminal" everywhere except in the names of Posix functions.

In text you added to with-raw-mode:

Therefore, it makes no sense to use any read operation on the terminal
except read-char.
No character is given special handling; all are passed to the
application exactly as received.
Echoing of input is disabled on the terminal during the execution of <code>thunk</code>
and then is re-enabled.

Does it make sense to allow the user to ask for more than one character with the existing min argument?

- Harold

On Tue, Aug 20, 2019 at 8:53 AM <xxxxxx@ancell-ent.com> wrote:
From: John Cowan <xxxxxx@ccil.org>
Date: Thursday, August 15, 2019 12:11 PM

On Thu, Aug 15, 2019 at 12:38 PM <xxxxxx@ancell-ent.com> wrote:

[...]
 
So with-rare-mode should get the min and time arguments like with-raw-mode.

I looked it up this time instead of shooting from the hip.  Rare (cbreak) mode is precisely -ICANON -ECHO VMIN=1 VTIME=0, so read-char will hang until a character is available and then return it.  That's why no min/time arguments are needed.  You can of course call read-line or any other read-* in rare or raw mode, but it will chew up a lot of CPU going into and out of kernel mode for every character.

Could you look up the rest so I know what you intend for (with-raw-mode port min time thunk), (without-interrupt-chars port thunk), and (without-echo port thunk)?

- Harold