summaryrefslogtreecommitdiff
path: root/src/exec.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 20:51:06 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commit015152bb7e28a26d135fc4bc67b09a5f53d5080b (patch)
treed5ed31d3a0dee08e07c54f045f2fd0c13e2e4d8c /src/exec.zig
parent78ee8672307adbdf30a2afffc38efb70217dc212 (diff)
downloadpardes-015152bb7e28a26d135fc4bc67b09a5f53d5080b.tar.gz
pardes-015152bb7e28a26d135fc4bc67b09a5f53d5080b.zip
A shell that exits under a run answers exit N, and the log says exit before del
A dogfood agent ran `exit 3` through pty/run: the reader got ENOENT, and the log went straight to del. The hosts now read a shell's exit status at its pty's end as they do a command's; a run waiting on the line answers `exit 3` with what it printed, the log says `exit <serial> 3` before the pane's `del`, and an open run still stats after its pane is gone (cat fstats its input). Pins cloud9 f35b7ed, whose stat of an open fid names its open. Writes to a gone pane's pty/data, held open or not, fail ENOENT. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/exec.zig')
-rw-r--r--src/exec.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/exec.zig b/src/exec.zig
index ee7c31e9..1e9d4b2d 100644
--- a/src/exec.zig
+++ b/src/exec.zig
@@ -634,7 +634,7 @@ fn echoCommand(p: *Pardes, pane: *Pane, line: []const u8) void {
/// The whole line, one record as `msg` carries its text: its control
/// characters, a newline too, become spaces (events.pushLog). A new pane is
/// announced first, so `new` comes before the `run` in it.
-fn noteRun(p: *Pardes, pane: *Pane, what: []const u8, said: []const u8) void {
+pub fn noteRun(p: *Pardes, pane: *Pane, what: []const u8, said: []const u8) void {
pardes.ctlfs.events.announce(p);
var buf: [command_max + 16]u8 = undefined;
pardes.ctlfs.events.notePath(p, what, std.fmt.bufPrint(&buf, "{d} {s}", .{ pane.serial, std.mem.trim(u8, said, " \t\r\n") }) catch return);