diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 20:51:06 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | 015152bb7e28a26d135fc4bc67b09a5f53d5080b (patch) | |
| tree | d5ed31d3a0dee08e07c54f045f2fd0c13e2e4d8c /src/pardes.zig | |
| parent | 78ee8672307adbdf30a2afffc38efb70217dc212 (diff) | |
| download | pardes-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/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index a3436870..239987ea 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -5157,8 +5157,11 @@ pub const Pardes = struct { panes.Terminal.feedOutput(p, pane, o.bytes); ctlfs.pty.noteMarks(p, o.pane, pane); }, - .exited => |e| if (p.panes[e.pane]) |pane| if (pane.command != null and !pane.command_done) { - exec.commandDone(p, e.pane, e.status); + .exited => |e| if (p.panes[e.pane]) |pane| { + if (pane.command == null) + ctlfs.pty.shellExited(p, pane, e.status) + else if (!pane.command_done) + exec.commandDone(p, e.pane, e.status); }, .eof => |e| if (p.panes[e.pane]) |pane| if (pane.command != null) { // Output is over; the command is over when its child exits. |
