From 28c814aa5cfea23e8950ef007916ffc5d089288d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 27 Sep 2026 20:09:02 -0300 Subject: Hold a read that has nothing yet and answer it when its file has news A following log, event, pty/data or a pty/run before its answer used to answer .again and wait for a wakeAll, which only the parked-write path asked for, so the band-aid had every queue push set turn.parked. Now the core keeps such a read (ctlfs.hold) and, as the turn is given up after anything that queued a record, ran a command out or closed a pane, answers it on its own connection, the way factotum answers the log reads it keeps and acme an event read. Only a read the engine still holds parked is answered, because cloud9 tells the backend nothing of a Tflush, so a flushed read spends no record. Co-Authored-By: Claude Opus 5.5 --- docs/fs.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'docs/fs.md') diff --git a/docs/fs.md b/docs/fs.md index 90849a58..0d6ffcda 100644 --- a/docs/fs.md +++ b/docs/fs.md @@ -192,10 +192,20 @@ pane is being made can precede that pane's `new`; panes present at boot are recorded before anything else. Control characters in a record become spaces, so a record is one line. An open freezes the ring's text the way `/screen` freezes a frame: reads walk it -and end. Writing `follow` to that same open makes reads past it park for the +and end. Writing `follow` to that same open makes reads past it wait for the next record, one per read; a follower the ring outran reads `lost N` first. Closing the open is the only way back, as with rio's `consctl`. +A read with nothing to give yet -- a following `log`, `event`, `pty/data`, a +`pty/run` before its answer -- is held, the way factotum holds its log's reads +(security/auth/factotum/log.c) and acme an event read: the core keeps it, and +whoever next has news for it (a record, output, a run's answer, the pane +closing, which answers "No such file or directory") answers it on the connection it +came on as the turn is given up. Nothing else parked is retried for it. A +read the client flushed meanwhile is dropped unanswered, so no record is +spent on it. An open waits with one read at a time, as acme's window keeps +one `eventx`. QUIC connections still retry their parked reads each tick. + `pty/run` runs one line at a terminal's prompt and answers how it ended, on the same open (factotum's `rpc` shape): write the line, then read `exit N` once the command has ended and the shell is back at a prompt, followed by -- cgit v1.3