An HTTP/1.1 server for zig
0

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #184 from asessa/fix/eventfd-write-size-32bit

Fix shutdown on 32-bit Linux: eventfd write must be 8 bytes

authored by

Karl Seguin and committed by
GitHub
(Feb 26, 2026, 6:01 PM +0800) 1fe7ec85 ddaf1989

+4 -2
+4 -2
src/worker.zig
··· 1215 1215 } 1216 1216 1217 1217 fn stop(self: *Self) void { 1218 - const increment: usize = 1; 1218 + // eventfd requires exactly 8 bytes; use u64 so 32-bit (e.g. Linux ARM) does not get EINVAL. 1219 + const increment: u64 = 1; 1219 1220 _ = posix.write(self.close_fd, std.mem.asBytes(&increment)) catch |err| { 1220 1221 log.err("Failed to write to closefd: {}", .{err}); 1221 1222 }; 1222 1223 } 1223 1224 1224 1225 fn signal(self: *const Self) !void { 1225 - const increment: usize = 1; 1226 + // eventfd requires exactly 8 bytes; use u64 so 32-bit (e.g. Linux ARM) does not get EINVAL. 1227 + const increment: u64 = 1; 1226 1228 _ = try posix.write(self.event_fd, std.mem.asBytes(&increment)); 1227 1229 } 1228 1230