From f4412d6dfdb1e2bd8549a7edba785ee242fd38f2 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 27 Sep 2026 17:52:31 -0300 Subject: Wake reads waiting on /log, event and pty/data; one reader per consuming file; pty/ctl reads back A read parked on a queue was retried only when some unrelated write had to wait, so a follower of /log (and a reader of event or pty/data) slept until then. Pushing a record now marks the turn parked, and giving the turn up wakes them (measured: stuck past 3 s before, 0 s after). event and pty/data consume what they read, so a second open for reading is refused with rio's "file in use" (EBUSY through 9ns); writers still get in, and pty/data queues output only for an actual reader. pty/ctl reads back "winsize C R", in the words it takes. /log fixes from review: a record longer than a read comes in pieces (a shell read loop failed on long lines), every repeated message is logged, a record bigger than the ring is cut to fit instead of emptying it, the ring is reserved at boot so recording never allocates, and panes present at boot are recorded first. Co-Authored-By: Claude Opus 5.5 --- docs/fs.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/fs.md b/docs/fs.md index a0dd86fa..9d95b36e 100644 --- a/docs/fs.md +++ b/docs/fs.md @@ -186,12 +186,17 @@ an open renders its frame; stat the entry. `/log` is one ring (64 KiB) that records whether or not anyone reads it: `new`, `del`, `rename` and `save `, and `msg ` -for every line the editor says, builtins announcing themselves included. +for every line the editor says, repeats included (with `verbose` on, that +includes each builtin announcing itself as it runs). A `msg` said while a +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 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`. `/screen` returns JSON with +Closing the open is the only way back, as with rio's `consctl`. A record +longer than a read comes in pieces, so a shell's `read` loop works. `tail -f` +never writes `follow`, so it sees nothing new: use the follow open instead. `/screen` returns JSON with `cols`, `rows`, `cursor`, a `styles` table, and row-major `cells` of `[grapheme, style_index]`. Each open freezes one frame until close. A terminal `body` freezes its history on the first read of each open handle; -- cgit v1.3