Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

Use bufPrintSentinel for the Linux sender lookup

justrach9c83ea6d8521
diff --git a/src/term_sender.zig b/src/term_sender.zig
index d01190aa..d0709a3d 100644
--- a/src/term_sender.zig
+++ b/src/term_sender.zig
@@ -38,7 +38,7 @@ fn senderName(pid: i32, buf: []u8) []const u8 {
return if (n > 0) buf[0..@min(@as(usize, @intCast(n)), buf.len)] else "";
}
var path_buf: [32]u8 = undefined;
- const path = std.fmt.bufPrintZ(&path_buf, "/proc/{d}/comm", .{pid}) catch return "";
+ const path = std.fmt.bufPrintSentinel(&path_buf, "/proc/{d}/comm", .{pid}, 0) catch return "";
const fd = std.os.linux.open(path, .{ .ACCMODE = .RDONLY }, 0);
if (std.os.linux.errno(fd) != .SUCCESS) return "";
defer _ = std.os.linux.close(@intCast(fd));