diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-01 22:58:12 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 22:58:12 -0300 |
| commit | 3ddd34bcd94ba95d9cacbf6afcb9f89a16a414ce (patch) | |
| tree | e4fee3fc0c7e228f4ac0a5877eb44b997f7bdb11 /src/ninep/ctl.zig | |
| parent | 1b654dfeb5b832d110beef0ec7dd8a3b7f66e431 (diff) | |
| download | pardes-3ddd34bcd94ba95d9cacbf6afcb9f89a16a414ce.tar.gz pardes-3ddd34bcd94ba95d9cacbf6afcb9f89a16a414ce.zip | |
Edit's w to a file changed on disk since read is refused once, as Save is (w again to overwrite), the rest of an X/'/w written and the refused named; Edit filters get a pane command's environment ($PARDES_MOUNT, $PARDES_9P, $PARDES_PID, $winid); an Edit with no commands runs beside one whose commands run unless it touches a file that one changes, refused busy (EBUSY) as is a second Edit with commands
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/ctl.zig')
| -rw-r--r-- | src/ninep/ctl.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index 8ece7ead..917c9c39 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -318,6 +318,9 @@ pub fn captured(p: *Pardes, req: Req, id: usize, exec: bool, text: []const u8, i /// there (`no such`, `not found`, the words 9ns reads as ENOENT too), else /// EIO. pub fn failureErrno(failure: []const u8) u16 { + // Refused while something else runs (an Edit's commands): EBUSY, the + // word 9ns reads as it. + if (std.mem.indexOf(u8, failure, "busy: ") != null) return E.BUSY; if (std.mem.indexOf(u8, failure, "no such") != null or std.mem.indexOf(u8, failure, "not found") != null) return E.NOENT; // A pattern refused (Edit's too) is malformed input, as 9ns reads it; // so is a word this build has not (`invalid: acme's Put ...`). |
