zig icon indicating copy to clipboard operation
zig copied to clipboard

std (posix): lower `getpid` and `getppid` into `std.posix`

Open QSmally opened this issue 6 months ago • 0 comments

Simply puts getpid() and getppid() into std.posix by making use of posix.system if available. Removes a tiny bit of boilerplate when making cross-Darwin-Linux platform stuff by not referencing std.c or std.os.linux directly.

Also adds a proper test for getppid(). Kind of depends on fork() and waitpid() but I'm not sure what the policy of inter-dependent tests are.

QSmally avatar May 29 '25 23:05 QSmally