fail to find EAGAIN by experiment
This commit is contained in:
parent
2fea95e100
commit
56715c3079
2 changed files with 39 additions and 0 deletions
12
eagain.zig
Normal file
12
eagain.zig
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue