diff --git a/src/os/cgroup.zig b/src/os/cgroup.zig index 095c90aa3..d94a4a728 100644 --- a/src/os/cgroup.zig +++ b/src/os/cgroup.zig @@ -130,6 +130,7 @@ pub fn cloneInto(cgroup: []const u8) !posix.pid_t { }; const rc = linux.syscall2(linux.SYS.clone3, @intFromPtr(&args), @sizeOf(@TypeOf(args))); + // do not use posix.errno, when linking libc it will use the libc errno which will not be set when making the syscall directly return switch (std.os.linux.E.init(rc)) { .SUCCESS => @as(posix.pid_t, @intCast(rc)), else => |errno| err: {