From 1db5ba2b267f030e2de54a2cb4de9fb155c4139d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 18:23:04 -0300 Subject: Only a write logs an err: a refused open or truncation, create or remove, or a write to pane/new, is its error alone, and every refusal is said in words The one-failure rule is a write's. A refused remove, pane/new's open refused for want of a slot, and an OTRUNC open's refused truncation (data's after a failed addr) also logged an err, and a reply carrying only an errno reached the client as the C library's text (Operation not permitted). tree.handle now gives such a reply Plan 9's words, chosen so 9ns maps each back to its errno (EPERM's to EACCES, as Plan 9's does), and serveFs logs errs for writes only, not a write to pane/new, which is only read. docs/fs.md and the 9P skill say so, and that a look miss quotes what was written. Co-Authored-By: Claude Opus 5.5 --- docs/fs.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'docs/fs.md') diff --git a/docs/fs.md b/docs/fs.md index 760693e5..52f991c2 100644 --- a/docs/fs.md +++ b/docs/fs.md @@ -819,9 +819,17 @@ nothing empties it rather than leave the last rows), while a plain word's `LookWord list` search keeps a pane a pattern, ENOSPC for no room or slot, EBUSY for a held lock) -- and logs its reason exactly once, as `err : `, with no `msg` for it. A builtin a click runs (Save, get's -`Modified`, Tty with no room, Edit) is no exception. What is not a +`Modified`, Tty with no room, Edit) is no exception. The rule is a write's: +a refused open or truncation -- an OTRUNC open, such as `data`'s after a +failed `addr` --, create or remove answers its error and +logs no `err`, and so do a write to `pane/new` (`permission denied`: it is +only read) and a write on a fid opened OREAD (`bad use of fid`). Every +refusal is said in words, Plan 9's where pardes has none of its own +(`permission denied`, `file does not exist`, `bad argument`), never a C +library string such as `Operation not permitted`. What is not a failure: a look that finds nothing answers nothing and logs one `err` -(`look: no match for ...`, the same miss again counted, `(x2)`, as any +(`look: no match for ...`, quoting what was written in every form -- +`no match for "zzq:#3"`, `no match for "zzq:2"` -- the same miss again counted, `(x2)`, as any repeated `err` is), the write succeeding; and a command line run in a command pane ends in its own time, told by its `exit` record. -- cgit v1.3