mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:44:43 +01:00
goodbye posix.fork
see #6600 nobody should be using fork anyway, especially Redis
This commit is contained in:
parent
3961fe3de9
commit
45b931a23f
1 changed files with 0 additions and 12 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue