summaryrefslogtreecommitdiff
path: root/src/exec.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 00:40:03 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commit6732ce6edcf1562d3e126ed02f96466ab07c498e (patch)
tree77c68f4357b335e67b34f19e248f1ea00240e0eb /src/exec.zig
parentfad6bf0cc7cc2cb579d9ad03147a7014906f6b92 (diff)
downloadpardes-6732ce6edcf1562d3e126ed02f96466ab07c498e.tar.gz
pardes-6732ce6edcf1562d3e126ed02f96466ab07c498e.zip
A desktop session holds 64 panes, and every route that finds none free says so
Sixteen panes was far too few for a real session. MAX_PANES is now 64 on a desktop and stays 16 on the board; the 48 more slots cost about 3.7 KB each in fixed tables (the core 1.33 to 1.45 MB, its surface 19 to 72 KB), and a pane itself (84 KB and its terminal) is allocated only when it opens. At the cap, pane/new fails with `pane/new: no pane slots: 64 max` and an err record rather than a bare ENFILE, a 9P look or exec that would open a pane fails its write with the same words and reads back empty, and New, Tty, Tutor and Alt-n say it on the message row (their ctl writes fail with it). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/exec.zig')
-rw-r--r--src/exec.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/exec.zig b/src/exec.zig
index 2f279d8e..d4480e00 100644
--- a/src/exec.zig
+++ b/src/exec.zig
@@ -312,7 +312,7 @@ pub fn spawnV9fsTty(p: *Pardes, from: usize) void {
fn spawnTtyWithMount(p: *Pardes, from: usize, v9fs: bool) ?*Pane {
const src = p.panes[from] orelse return null;
const free = p.freeSlot() orelse {
- p.reportFailure(from, "Tty: no pane free");
+ p.reportError(from, "Tty", error.NoPaneSlots);
return null;
};
const nt = p.newShell(free, Pardes.paneDir(src)) catch |err| {
@@ -609,7 +609,7 @@ fn runCommand(p: *Pardes, from: usize, line: []const u8) ?usize {
return id;
}
const free = p.freeSlot() orelse {
- p.reportFailure(from, "exec: no pane free for the command");
+ p.reportError(from, "exec", error.NoPaneSlots);
return null;
};
const pane = p.newCommand(free, dir, line) catch |err| {