From 3aa24c27c62c740cd7647831d0a14a9b180992da Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 1 Oct 2026 10:04:23 -0300 Subject: An exec or Tty from a pane whose directory is a peer's path refuses before making any pane: `exec: : no such directory`, no `exit 127` pane left A peer's directory (`/n/peer/x`) is no directory on this host, where the shell starts, so a command there ran in a pane that could only say `(pwd) exit 127`, and a Tty made a new/del pair. missingDir now counts such a path missing, as it does a local directory that is not there. Co-Authored-By: Claude Opus 5.5 --- src/exec.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/exec.zig b/src/exec.zig index 080d0aea..5b170375 100644 --- a/src/exec.zig +++ b/src/exec.zig @@ -440,7 +440,10 @@ fn refusedPlacement(p: *Pardes, id: usize) bool { pub fn missingDir(p: *Pardes, dir: []const u8) bool { if (comptime !hosted) return false; if (p.host.vtable.spawn == null) return false; - const local = @import("fs.zig").localPath(dir) orelse return false; + // A peer's directory (`/n/peer/x`) is no directory on this host, where + // the shell would start: no command or terminal runs there, and none + // is made to say `exit 127`. + const local = @import("fs.zig").localPath(dir) orelse return std.mem.startsWith(u8, dir, "/n/"); return !isDirectory(local); } -- cgit v1.3