| ... | @@ -345,7 +345,13 @@ pub fn fork() errno.Error!pid_t { | ... | @@ -345,7 +345,13 @@ pub fn fork() errno.Error!pid_t { |
| 345 | // vfork | 345 | // vfork |
| 346 | // pid_t vfork(void); | 346 | // pid_t vfork(void); |
| 347 | // asmlinkage long sys_vfork(void); | 347 | // asmlinkage long sys_vfork(void); |
| 348 | pub const vfork = @compileError("TODO: vfork"); | 348 | pub fn vfork() errno.Error!pid_t { |
| | 349 | const r = syscall0(.vfork); |
| | 350 | return switch (_errno(r)) { |
| | 351 | .ok => @intCast(r), |
| | 352 | _ => |c| errno.errorFromInt(@intFromEnum(c)), |
| | 353 | }; |
| | 354 | } |
| 349 | | 355 | |
| 350 | // execve | 356 | // execve |
| 351 | // int execve(const char *pathname, char *const _Nullable argv[], char *const _Nullable envp[]); | 357 | // int execve(const char *pathname, char *const _Nullable argv[], char *const _Nullable envp[]); |