fail to find EAGAIN by experiment

This commit is contained in:
root 2025-05-18 13:13:13 +00:00
parent 2fea95e100
commit 56715c3079
2 changed files with 39 additions and 0 deletions

12
eagain.zig Normal file
View file

@ -0,0 +1,12 @@
const std = @import("std");
const path = "eagain.sock";
const spam: [0xffff]u8 = undefined;
pub fn main() !void {
const stream = try std.net.connectUnixSocket(path);
_ = try std.posix.fcntl(stream.handle, std.c.F.SETFL, std.c.SOCK.NONBLOCK);
for (0..99999) |_| {
_ = try stream.write(&spam);
}
}