std.process.Child: remove pid and handle, add id

Previously, this API had pid, to be used on POSIX systems, and handle,
to be used on Windows.

This commit unifies the API, defining an Id type that is either the pid
or the HANDLE depending on the target OS.

This commit also prepares for the future by allowing one to import via
`std.process.Child` which is the fully qualified namespace that I intend
to migrate to in the future.
This commit is contained in:
Andrew Kelley
2023-03-02 22:56:52 -07:00
parent bb5006d728
commit aaaaab9ec2
3 changed files with 37 additions and 20 deletions

View File

@@ -9,6 +9,7 @@ const assert = std.debug.assert;
const testing = std.testing;
const child_process = @import("child_process.zig");
pub const Child = child_process.ChildProcess;
pub const abort = os.abort;
pub const exit = os.exit;
pub const changeCurDir = os.chdir;