zig
zig copied to clipboard
std (posix): lower `getpid` and `getppid` into `std.posix`
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.