From ad3403adb72e3457eb76d6b3fc91cf8df3d738ae Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 09:51:11 -0300 Subject: 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 --- src/panes.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/panes.zig') 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 -- cgit v1.3