summaryrefslogtreecommitdiff
path: root/src/tape.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-04 23:51:05 -0300
committerGabriel Schneider <[email protected]>2026-11-05 09:54:56 -0300
commit39639ae907637cb8355fbd0a63b1491616474cb5 (patch)
tree937da1796d749b9ea853871e7b071f33525a7a68 /src/tape.zig
parentc34cfba8ab10d5cf2dc69c01d55f3e244295cc6f (diff)
downloadpardes-39639ae907637cb8355fbd0a63b1491616474cb5.tar.gz
pardes-39639ae907637cb8355fbd0a63b1491616474cb5.zip
host_io.writeFd writes a shell's staged rc, an Upgrade's dump and a tape's buffer, each of which looped over write by hand (the tape's gave up at an EINTR)
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/tape.zig')
-rw-r--r--src/tape.zig7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/tape.zig b/src/tape.zig
index 29b1197d..56789f44 100644
--- a/src/tape.zig
+++ b/src/tape.zig
@@ -283,12 +283,7 @@ pub const Tape = struct {
// A tape in memory (a replica's, an authority's stream) is taken
// by whoever holds it.
if (t.fd < 0) return;
- var at: usize = 0;
- while (at < t.buf.items.len) {
- const n = libc.write(t.fd, t.buf.items[at..].ptr, t.buf.items.len - at);
- if (n <= 0) break;
- at += @intCast(n);
- }
+ _ = host_io.writeFd(t.fd, t.buf.items);
t.buf.clearRetainingCapacity();
}