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/9p_io.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/9p_io.zig') diff --git a/src/9p_io.zig b/src/9p_io.zig index 4c9c9bcf..72897979 100644 --- a/src/9p_io.zig +++ b/src/9p_io.zig @@ -318,7 +318,7 @@ pub const Listener = struct { const late = core.fs.late_failure[0..core.fs.late_failure_len]; // What is not there (`no such directory`) is ENOENT, as a // builtin's failure saying so is (ctl.failureErrno). - const errno = if (std.mem.indexOf(u8, late, "no such") != null) pardes.ctlfs.E.NOENT else pardes.ctlfs.E.IO; + const errno = if (std.mem.indexOf(u8, late, "no such") != null or std.mem.indexOf(u8, late, "not found") != null) pardes.ctlfs.E.NOENT else pardes.ctlfs.E.IO; const failed = pardes.ctlfs.failText(req.tag, errno, late); // Its err record says it (the path in it); the msg the failure // was also said as goes, as a builtin's failing a write does. -- cgit v1.3