| author | |
| committer | |
| log | b04e8a1fb618f69289d6782e8686610dad06423d |
| tree | 37c7f1163891deafe6eac943b30feabcb68929b4 |
| parent | 917a00d70c663a959c8aee6c80cf79feba7d2314 |
| signature |
2 files changed, 7 insertions(+), 0 deletions(-)
mod.zig+6| ... | @@ -3594,3 +3594,9 @@ pub fn kill(pid: pid_t, sig: c_int) !void { | ... | @@ -3594,3 +3594,9 @@ pub fn kill(pid: pid_t, sig: c_int) !void { |
| 3594 | if (rc == -1) return errno.fromInt(errno.fromLibC()); | 3594 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 3595 | std.debug.assert(rc == 0); | 3595 | std.debug.assert(rc == 0); |
| 3596 | } | 3596 | } |
| 3597 | pub fn fork() !pid_t { | ||
| 3598 | const rc = libc.fork(); | ||
| 3599 | if (rc == -1) return errno.fromInt(errno.fromLibC()); | ||
| 3600 | std.debug.assert(rc >= 0); | ||
| 3601 | return rc; | ||
| 3602 | } |
test.zig+1| ... | @@ -72,4 +72,5 @@ test { | ... | @@ -72,4 +72,5 @@ test { |
| 72 | _ = &linux.pthread_rwlock_unlock; | 72 | _ = &linux.pthread_rwlock_unlock; |
| 73 | _ = &linux.pipe2; | 73 | _ = &linux.pipe2; |
| 74 | _ = &linux.kill; | 74 | _ = &linux.kill; |
| 75 | _ = &linux.fork; | ||
| 75 | } | 76 | } |