Archived
3
0
This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues or pull requests.
libipc-old/zig-impl/src/misc-test.zig

28 lines
636 B
Zig
Raw Normal View History

2022-12-24 18:57:51 +01:00
const std = @import("std");
const hexdump = @import("./hexdump.zig");
const testing = std.testing;
const net = std.net;
const fmt = std.fmt;
const print = std.debug.print;
const P = std.ArrayList(std.os.pollfd);
fn create_service() !void {
const config = .{.safety = true};
var gpa = std.heap.GeneralPurposeAllocator(config){};
defer _ = gpa.deinit();
const allocator = gpa.allocator();
var p = P.init(allocator);
defer p.deinit();
try p.append(.{.fd = 8, .events = 0, .revents = 0});
for(p.items) |i| { print("fd: {}\n", .{i.fd}); }
}
pub fn main() !u8 {
try create_service();
return 0;
}