| ... | @@ -1046,18 +1046,6 @@ pub fn mprotect(memory: []align(page_size_min) u8, protection: u32) MProtectErro | ... | @@ -1046,18 +1046,6 @@ pub fn mprotect(memory: []align(page_size_min) u8, protection: u32) MProtectErro |
| 1046 | } | 1046 | } |
| 1047 | } | 1047 | } |
| 1048 | | 1048 | |
| 1049 | pub const ForkError = error{SystemResources} || UnexpectedError; | | |
| 1050 | | | |
| 1051 | pub fn fork() ForkError!pid_t { | | |
| 1052 | const rc = system.fork(); | | |
| 1053 | switch (errno(rc)) { | | |
| 1054 | .SUCCESS => return @intCast(rc), | | |
| 1055 | .AGAIN => return error.SystemResources, | | |
| 1056 | .NOMEM => return error.SystemResources, | | |
| 1057 | else => |err| return unexpectedErrno(err), | | |
| 1058 | } | | |
| 1059 | } | | |
| 1060 | | | |
| 1061 | pub const MMapError = error{ | 1049 | pub const MMapError = error{ |
| 1062 | /// The underlying filesystem of the specified file does not support memory mapping. | 1050 | /// The underlying filesystem of the specified file does not support memory mapping. |
| 1063 | MemoryMappingNotSupported, | 1051 | MemoryMappingNotSupported, |