From 39639ae907637cb8355fbd0a63b1491616474cb5 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 4 Nov 2026 23:51:05 -0300 Subject: 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 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/tape.zig | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/tape.zig') 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(); } -- cgit v1.3