diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compilation.zig | 6 | ||||
| -rw-r--r-- | src/link.zig | 4 | ||||
| -rw-r--r-- | src/link/Coff.zig | 10 | ||||
| -rw-r--r-- | src/link/Wasm.zig | 2 | ||||
| -rw-r--r-- | src/main.zig | 12 |
5 files changed, 17 insertions, 17 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 5675c82222..03b981812e 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1935,7 +1935,7 @@ pub fn getTarget(self: Compilation) Target { pub fn hotCodeSwap( comp: *Compilation, prog_node: *std.Progress.Node, - pid: std.ChildProcess.Id, + pid: std.process.Child.Id, ) !void { const lf = comp.bin_file.?; lf.child_pid = pid; @@ -4615,7 +4615,7 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_obj_prog_node: *std.P log.warn("failed to delete '{s}': {s}", .{ dep_file_path, @errorName(err) }); }; if (std.process.can_spawn) { - var child = std.ChildProcess.init(argv.items, arena); + var child = std.process.Child.init(argv.items, arena); if (comp.clang_passthrough_mode) { child.stdin_behavior = .Inherit; child.stdout_behavior = .Inherit; @@ -4974,7 +4974,7 @@ fn spawnZigRc( var node_name: std.ArrayListUnmanaged(u8) = .{}; defer node_name.deinit(arena); - var child = std.ChildProcess.init(argv, arena); + var child = std.process.Child.init(argv, arena); child.stdin_behavior = .Ignore; child.stdout_behavior = .Pipe; child.stderr_behavior = .Pipe; diff --git a/src/link.zig b/src/link.zig index 8aec0799e2..c05b545a89 100644 --- a/src/link.zig +++ b/src/link.zig @@ -72,7 +72,7 @@ pub const File = struct { /// Prevents other processes from clobbering files in the output directory /// of this linking operation. lock: ?Cache.Lock = null, - child_pid: ?std.ChildProcess.Id = null, + child_pid: ?std.process.Child.Id = null, pub const OpenOptions = struct { symbol_count_hint: u64 = 32, @@ -529,7 +529,7 @@ pub const File = struct { } || fs.File.WriteFileError || fs.File.OpenError || - std.ChildProcess.SpawnError || + std.process.Child.SpawnError || fs.Dir.CopyFileError; /// Commit pending changes and write headers. Takes into account final output mode diff --git a/src/link/Coff.zig b/src/link/Coff.zig index 413294489a..31cfe1ca9d 100644 --- a/src/link/Coff.zig +++ b/src/link/Coff.zig @@ -893,7 +893,7 @@ fn writeAtom(self: *Coff, atom_index: Atom.Index, code: []u8) !void { } } -fn debugMem(allocator: Allocator, handle: std.ChildProcess.Id, pvaddr: std.os.windows.LPVOID, code: []const u8) !void { +fn debugMem(allocator: Allocator, handle: std.process.Child.Id, pvaddr: std.os.windows.LPVOID, code: []const u8) !void { const buffer = try allocator.alloc(u8, code.len); defer allocator.free(buffer); const memread = try std.os.windows.ReadProcessMemory(handle, pvaddr, buffer); @@ -901,7 +901,7 @@ fn debugMem(allocator: Allocator, handle: std.ChildProcess.Id, pvaddr: std.os.wi log.debug("in memory: {x}", .{std.fmt.fmtSliceHexLower(memread)}); } -fn writeMemProtected(handle: std.ChildProcess.Id, pvaddr: std.os.windows.LPVOID, code: []const u8) !void { +fn writeMemProtected(handle: std.process.Child.Id, pvaddr: std.os.windows.LPVOID, code: []const u8) !void { const old_prot = try std.os.windows.VirtualProtectEx(handle, pvaddr, code.len, std.os.windows.PAGE_EXECUTE_WRITECOPY); try writeMem(handle, pvaddr, code); // TODO: We can probably just set the pages writeable and leave it at that without having to restore the attributes. @@ -909,7 +909,7 @@ fn writeMemProtected(handle: std.ChildProcess.Id, pvaddr: std.os.windows.LPVOID, _ = try std.os.windows.VirtualProtectEx(handle, pvaddr, code.len, old_prot); } -fn writeMem(handle: std.ChildProcess.Id, pvaddr: std.os.windows.LPVOID, code: []const u8) !void { +fn writeMem(handle: std.process.Child.Id, pvaddr: std.os.windows.LPVOID, code: []const u8) !void { const amt = try std.os.windows.WriteProcessMemory(handle, pvaddr, code); if (amt != code.len) return error.InputOutput; } @@ -1031,7 +1031,7 @@ fn resolveRelocs(self: *Coff, atom_index: Atom.Index, relocs: []*const Relocatio } } -pub fn ptraceAttach(self: *Coff, handle: std.ChildProcess.Id) !void { +pub fn ptraceAttach(self: *Coff, handle: std.process.Child.Id) !void { if (!is_hot_update_compatible) return; log.debug("attaching to process with handle {*}", .{handle}); @@ -1041,7 +1041,7 @@ pub fn ptraceAttach(self: *Coff, handle: std.ChildProcess.Id) !void { }; } -pub fn ptraceDetach(self: *Coff, handle: std.ChildProcess.Id) void { +pub fn ptraceDetach(self: *Coff, handle: std.process.Child.Id) void { if (!is_hot_update_compatible) return; log.debug("detaching from process with handle {*}", .{handle}); diff --git a/src/link/Wasm.zig b/src/link/Wasm.zig index e82395ecea..bf345813df 100644 --- a/src/link/Wasm.zig +++ b/src/link/Wasm.zig @@ -3637,7 +3637,7 @@ fn linkWithLLD(wasm: *Wasm, arena: Allocator, prog_node: *std.Progress.Node) !vo // If possible, we run LLD as a child process because it does not always // behave properly as a library, unfortunately. // https://github.com/ziglang/zig/issues/3825 - var child = std.ChildProcess.init(argv.items, arena); + var child = std.process.Child.init(argv.items, arena); if (comp.clang_passthrough_mode) { child.stdin_behavior = .Inherit; child.stdout_behavior = .Inherit; diff --git a/src/main.zig b/src/main.zig index 61a97de3f5..099ceb27f9 100644 --- a/src/main.zig +++ b/src/main.zig @@ -4026,7 +4026,7 @@ fn serve( }); defer server.deinit(); - var child_pid: ?std.ChildProcess.Id = null; + var child_pid: ?std.process.Child.Id = null; var progress: std.Progress = .{ .terminal = null, @@ -4316,7 +4316,7 @@ fn runOrTest( const cmd = try std.mem.join(arena, " ", argv.items); fatal("the following command failed to execve with '{s}':\n{s}", .{ @errorName(err), cmd }); } else if (process.can_spawn) { - var child = std.ChildProcess.init(argv.items, gpa); + var child = std.process.Child.init(argv.items, gpa); child.env_map = &env_map; child.stdin_behavior = .Inherit; child.stdout_behavior = .Inherit; @@ -4379,7 +4379,7 @@ fn runOrTestHotSwap( arg_mode: ArgMode, all_args: []const []const u8, runtime_args_start: ?usize, -) !std.ChildProcess.Id { +) !std.process.Child.Id { const lf = comp.bin_file.?; const exe_path = switch (builtin.target.os.tag) { @@ -4456,7 +4456,7 @@ fn runOrTestHotSwap( return pid; }, else => { - var child = std.ChildProcess.init(argv.items, gpa); + var child = std.process.Child.init(argv.items, gpa); child.stdin_behavior = .Inherit; child.stdout_behavior = .Inherit; @@ -5245,7 +5245,7 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !void { } if (process.can_spawn) { - var child = std.ChildProcess.init(child_argv.items, gpa); + var child = std.process.Child.init(child_argv.items, gpa); child.stdin_behavior = .Inherit; child.stdout_behavior = .Inherit; child.stderr_behavior = .Inherit; @@ -5549,7 +5549,7 @@ fn jitCmd( }); } - var child = std.ChildProcess.init(child_argv.items, gpa); + var child = std.process.Child.init(child_argv.items, gpa); child.stdin_behavior = .Inherit; child.stdout_behavior = if (options.capture == null) .Inherit else .Pipe; child.stderr_behavior = .Inherit; |
