summaryrefslogtreecommitdiff
path: root/src/ninep/tree.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-02 00:50:41 -0300
committerGabriel Schneider <[email protected]>2026-10-02 01:43:04 -0300
commit97c939b981bc7fbf1a58511a9d83d9f1e12a8f16 (patch)
tree168f1c1cb7005d4b684be312a36be205e642f7df /src/ninep/tree.zig
parentd65ec3394ff619118d9208718477469c673a5598 (diff)
downloadpardes-97c939b981bc7fbf1a58511a9d83d9f1e12a8f16.tar.gz
pardes-97c939b981bc7fbf1a58511a9d83d9f1e12a8f16.zip
An Edit filter that can never be reaped no longer holds the Edit's answer: at the limit the command's group is killed and reaped off the answer's path, the stdin writer owning its input, so a filter writing its own ctl with > or >> answers EIO at 10 s instead of hanging; a running Edit keeps its own copies of the names it reports, and the panes it changes refuse Del, delete, rmdir, Undo, Redo, Get and Zerox (busy, EBUSY); e and r say unreadable files in Get's words; the reference says both sides of a filter's own ctl write need <>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/tree.zig')
-rw-r--r--src/ninep/tree.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ninep/tree.zig b/src/ninep/tree.zig
index c78a1aa2..8d3c599f 100644
--- a/src/ninep/tree.zig
+++ b/src/ninep/tree.zig
@@ -937,6 +937,8 @@ fn remove(p: *Pardes, req: Req) Reply {
};
if (t.file != .dir) return Reply.fail(req.tag, E.PERM);
const id = p.paneBySerial(t.serial) orelse return Reply.fail(req.tag, E.NOENT);
+ // A pane an Edit's running commands will change stays until they end.
+ if (@import("../edit_cmd.zig").busyOn(p, id)) return failText(req.tag, E.BUSY, @import("../edit_cmd.zig").e_busy);
p.removePane(id, null) catch return Reply.fail(req.tag, E.IO);
return .{ .tag = req.tag };
}