summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-01 09:54:20 -0300
committerGabriel Schneider <[email protected]>2026-10-01 10:16:45 -0300
commitcaa8ed077e8b9b67d18f18b3ec46891bd8d310a7 (patch)
tree05c09ee65e1a68aacffd90b137690d5b39ed9457 /docs
parenteda60572013d046d08e253e5847a0ba588c10339 (diff)
downloadpardes-caa8ed077e8b9b67d18f18b3ec46891bd8d310a7.tar.gz
pardes-caa8ed077e8b9b67d18f18b3ec46891bd8d310a7.zip
A command line runs when its newline comes, or at its open's close, never because a write was short: a long line cut by a mount is one line
A write shorter than its message, and not a multiple of 4096, was taken as whole, its tail a line. 9ns cuts a FUSE write of up to 512 KiB into 65512-byte Twrites, the last one short, so a 600 KiB `Edit ,c/.../` arrived cut and its tail ran as an unknown control message; the 1 MiB refusal failed the same way. Each open now holds a partial line until its newline, or its release, which ends the last line; an Edit block is whole when it closes, as before. A name write with a NUL still fails its write at once. selfmount writes a 600 KiB Edit line and a 1.1 MiB line through a real 9ns mount; building.typ says how lines are cut. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r--docs/typ/building.typ17
1 files changed, 8 insertions, 9 deletions
diff --git a/docs/typ/building.typ b/docs/typ/building.typ
index 85f2dfbb..6a2758ad 100644
--- a/docs/typ/building.typ
+++ b/docs/typ/building.typ
@@ -229,15 +229,14 @@ use `.cloud9 = .{ .path = "../cloud9" }` while editing both. cloud9's own
== Writes through a mount <writes-through-a-mount>
A mount cuts a big write into pieces of at most one message (msize 65536,
-less the header), and each command line runs once it is whole. A write
-that does not fill its message is whole, so its last line runs even
-without a newline (`printf Save > exec`), unless it is a multiple of 4096
-bytes: that is where a writer's buffer (stdio, a mount's page cache)
-filled and cut a line, so its tail waits for the next write or the close.
-A line held to the close (such a tail, or an `Edit` block never ended)
-runs there, and its failure is only in the log, as its `err` record: the
-close reports no error, and the write that sent it had already succeeded.
-So a script that needs a line's result ends the write with a newline.
+less the header), anywhere, and each command line runs once its newline
+comes; nothing is read into a write's size. A last line with no newline
+(`printf Save > exec`) runs when the file is closed, as does an `Edit`
+block never ended, and its failure is then only in the log, as its `err`
+record: the close reports no error, and the write that sent it had
+already succeeded. So a script that needs a line's result ends it with a
+newline. A line over 1 MiB is refused once, and the rest of it, through
+its newline, is dropped.
== Listeners <listeners>