authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-26 18:00:32 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-26 18:00:32 -07:00
logb04e8a1fb618f69289d6782e8686610dad06423d
tree37c7f1163891deafe6eac943b30feabcb68929b4
parent917a00d70c663a959c8aee6c80cf79feba7d2314
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

add fork


2 files changed, 7 insertions(+), 0 deletions(-)

mod.zig+6
......@@ -3594,3 +3594,9 @@ pub fn kill(pid: pid_t, sig: c_int) !void {
35943594 if (rc == -1) return errno.fromInt(errno.fromLibC());
35953595 std.debug.assert(rc == 0);
35963596}
3597pub 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 {
7272 _ = &linux.pthread_rwlock_unlock;
7373 _ = &linux.pipe2;
7474 _ = &linux.kill;
75 _ = &linux.fork;
7576}