fix errno handle
parent
c5508e7d19
commit
bc156266c6
|
|
@ -130,7 +130,7 @@ pub fn cloneInto(cgroup: []const u8) !posix.pid_t {
|
|||
};
|
||||
|
||||
const rc = linux.syscall2(linux.SYS.clone3, @intFromPtr(&args), @sizeOf(@TypeOf(args)));
|
||||
return switch (posix.errno(rc)) {
|
||||
return switch (std.os.linux.E.init(rc)) {
|
||||
.SUCCESS => @as(posix.pid_t, @intCast(rc)),
|
||||
else => |errno| err: {
|
||||
log.err("unable to clone: {}", .{errno});
|
||||
|
|
|
|||
Loading…
Reference in New Issue