diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-01 10:04:23 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 10:36:27 -0300 |
| commit | 3aa24c27c62c740cd7647831d0a14a9b180992da (patch) | |
| tree | 994cb2128180441613783f305f3dd9ba45e4331a /src | |
| parent | 9b641cbe3dc6c226be158e5051afafb9eb86c122 (diff) | |
| download | pardes-3aa24c27c62c740cd7647831d0a14a9b180992da.tar.gz pardes-3aa24c27c62c740cd7647831d0a14a9b180992da.zip | |
An exec or Tty from a pane whose directory is a peer's path refuses before making any pane: `exec: <dir>: 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 <[email protected]>
Diffstat (limited to 'src')
| -rw-r--r-- | src/exec.zig | 5 |
1 files changed, 4 insertions, 1 deletions
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); } |
