From 77c535a4f5acb99e55ad8312063f65cc85a3bcd9 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 16:23:11 -0300 Subject: pty/run takes one line a run, its answer read before the next Two lines -- in one write, or as bash writes them, a line at a time on one open -- each ran, and the first's answer was lost under the second's. A write with more than one line, or a next line before the last answer is read, is now refused, EINVAL. Co-Authored-By: Claude Opus 5.5 --- docs/fs.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs/fs.md') diff --git a/docs/fs.md b/docs/fs.md index 6bf30212..de1113bd 100644 --- a/docs/fs.md +++ b/docs/fs.md @@ -967,7 +967,9 @@ acme's window keeps one `eventx`; a second read on it meanwhile fails with `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 -what it printed. The output is what the screen showed between the command's +what it printed. One line a run: two lines in one write, or a next line on +the open before the last answer is read (bash writes `printf 'a\nb\n'` a +line at a time), are refused, EINVAL. The output is what the screen showed between the command's start and end marks: stderr interleaved, `\r` progress collapsed to its last state, no colour, tabs as the spaces they drew, trailing spaces trimmed and trailing blank lines dropped (`printf 'a\n\n\n'` answers `a`), leading -- cgit v1.3