summaryrefslogtreecommitdiff
path: root/src/panes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 09:51:11 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commitad3403adb72e3457eb76d6b3fc91cf8df3d738ae (patch)
tree1669efb3e6891b3a32a71c1fcffe8dd48428d9b2 /src/panes.zig
parent6e2ed2e057ba95b3a86186c255d1965e1861bdf7 (diff)
downloadpardes-ad3403adb72e3457eb76d6b3fc91cf8df3d738ae.tar.gz
pardes-ad3403adb72e3457eb76d6b3fc91cf8df3d738ae.zip
A shell that cannot start fails Tty and pty/ctl exec with why, before either answers
A shell whose exec failed (a script's missing interpreter) was reported started: Tty and pty/ctl exec succeeded, then the pane died. The child now reports a failed chdir or exec through a close-on-exec pipe the parent reads before acknowledging the shell; the host's spawn fails with the reason (`shell not found`, ENOENT), which fails the waiting write. A Tty whose first shell never ran leaves no pane; a terminal restarted by pty/ctl exec keeps its pane. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/panes.zig')
-rw-r--r--src/panes.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/panes.zig b/src/panes.zig
index f2fe5037..32ad7b6b 100644
--- a/src/panes.zig
+++ b/src/panes.zig
@@ -113,6 +113,9 @@ pub const Pane = struct {
/// then /proc says this process's directory, not the shell's
/// (Pardes.setCwd keeps the one it was started in).
shell_spoke: bool = false,
+ /// A shell has run in it (Pardes.acknowledgeShell): a Tty whose first
+ /// shell fails to start closes, one started again keeps its pane.
+ had_shell: bool = false,
pending_command: Terminal.PendingCommand = .{},
/// The last command line pardes typed into this terminal (an exec, a
/// middle click, a pty/run): its first word, which Kill matches, and