From 7dc3891ed574d6e96548f592b09b0f8abc87ae2a Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 27 Sep 2026 20:20:27 -0300 Subject: Keep what each open holds in one table of open records Snapshots (and /log's cursor), runs, and the reader_handle constants for event and pty/data each reused the open handle and each validated handle and node on its own. Now p.fs.opens is one table of 64 records, each the node it was opened on and a tagged union of what it holds, like lib9p's per-fid aux and acme's Fid (editors/acme/dat.h:373-385): one lookup (openOf), one release, ENFILE when full. A held read lives in its open's record, so it goes with the release. Opens that hold nothing answer handle 0 and take no record. Co-Authored-By: Claude Opus 5.5 --- docs/fs.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'docs/fs.md') diff --git a/docs/fs.md b/docs/fs.md index 0d6ffcda..64ac9ba1 100644 --- a/docs/fs.md +++ b/docs/fs.md @@ -232,8 +232,11 @@ never writes `follow`, so it sees nothing new: use the follow open instead. `/sc `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; -`pty/data` streams live output. Screen and terminal-body snapshots share 32 -handle slots, released on close or disconnect. +`pty/data` streams live output. An open that holds something between open +and close -- a frozen screen, terminal body or log, a run, an `event` or +`pty/data` open -- takes one of 64 records (lib9p's per-fid aux, acme's +Fid), released on close or disconnect; past that such an open fails with +`ENFILE`. Other opens hold nothing and are not counted. `-Dembed-sources=true` embeds the editor's sources and serves them under `/src` (and `/shaders` on GUI builds). `EffectCode ` lists the current -- cgit v1.3