goodbye posix.fork

see #6600

nobody should be using fork anyway, especially Redis
This commit is contained in:
Andrew Kelley 2026-01-07 15:01:37 -08:00
parent 3961fe3de9
commit 45b931a23f

View file

@ -1046,18 +1046,6 @@ pub fn mprotect(memory: []align(page_size_min) u8, protection: u32) MProtectErro
}
}
pub const ForkError = error{SystemResources} || UnexpectedError;
pub fn fork() ForkError!pid_t {
const rc = system.fork();
switch (errno(rc)) {
.SUCCESS => return @intCast(rc),
.AGAIN => return error.SystemResources,
.NOMEM => return error.SystemResources,
else => |err| return unexpectedErrno(err),
}
}
pub const MMapError = error{
/// The underlying filesystem of the specified file does not support memory mapping.
MemoryMappingNotSupported,