diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-03-02 22:37:07 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-03-15 10:48:13 -0700 |
| commit | 9bf63b09963ca6ea1179dfaa9142498556bfac9d (patch) | |
| tree | 61bc3e7308c21eb2dab6432a358be97e896edb1b /src/main.zig | |
| parent | 7ffdbb3b855ef9e4aa25a8ac911fce752a71e16d (diff) | |
| download | zig-9bf63b09963ca6ea1179dfaa9142498556bfac9d.tar.gz zig-9bf63b09963ca6ea1179dfaa9142498556bfac9d.zip | |
stage2: avoid linux-only APIs on other operating systems
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.zig b/src/main.zig index 6bf7177a9e..70051d2cc7 100644 --- a/src/main.zig +++ b/src/main.zig @@ -3534,7 +3534,7 @@ fn serve( try serveStringMessage(out, .zig_version, build_options.version); - var child_pid: ?i32 = null; + var child_pid: ?std.ChildProcess.Id = null; var receive_fifo = std.fifo.LinearFifo(u8, .Dynamic).init(gpa); defer receive_fifo.deinit(); @@ -3978,7 +3978,7 @@ fn runOrTestHotSwap( arg_mode: ArgMode, all_args: []const []const u8, runtime_args_start: ?usize, -) !i32 { +) !std.ChildProcess.Id { const exe_emit = comp.bin_file.options.emit.?; // A naive `directory.join` here will indeed get the correct path to the binary, // however, in the case of cwd, we actually want `./foo` so that the path can be executed. @@ -4023,7 +4023,7 @@ fn runOrTestHotSwap( try child.spawn(); - return child.pid; + return child.id; } const AfterUpdateHook = union(enum) { |
