diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 16:19:21 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | d6445bb28bcb4a0d0e5f29c6308682737d253ebe (patch) | |
| tree | 22e4c50aa4f58643190e2aca1176b02ecd6f6c24 /src/ninep/ctl.zig | |
| parent | eb47ded95f43e50dc24b841289b68814105dcfb7 (diff) | |
| download | pardes-d6445bb28bcb4a0d0e5f29c6308682737d253ebe.tar.gz pardes-d6445bb28bcb4a0d0e5f29c6308682737d253ebe.zip | |
A failure said while a 9P write waits on it posts no msg, only the write's err
A failure the editor said as it performed a write's work (a Save's disk write, a shell, a language server) was posted as a msg and taken back out when the write's err was logged, which it cannot be once a log follower has read it: a follower saw both. Such a failure is now posted without a msg in the first place (fs.write_waits), and nothing is taken back.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/ctl.zig')
| -rw-r--r-- | src/ninep/ctl.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index 397f3339..63e7e76a 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -2234,6 +2234,16 @@ test "a buffer whose file was deleted on disk is dirty, and Del asks first" { try testing.expect(p.paneBySerial(serial) == null); } +test "a failure said while a 9P write waits on it posts no msg, only the write's err" { + const p = try withFile(testing.allocator, "x\n"); + defer p.deinit(); + p.fs.write_waits = true; + p.saveFailed(@intCast(p.active), "/nowhere/zz.txt", error.FileNotFound); + p.fs.write_waits = false; + try testing.expect(!th.logHas(p, "msg ")); + try testing.expect(p.fs.late_failure_len > 0); +} + test "every EINVAL a write gets says why, in its err record too; DEL is a control character in a line" { const p = try withFile(testing.allocator, "x\n"); defer p.deinit(); |
