diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-12-08 16:13:51 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-12-23 22:15:08 -0800 |
| commit | 9ccd68de0b79c3723bd11071fd836bc24ff25b33 (patch) | |
| tree | 3441f2a7030f40a6b625f4ff9fc7d719a60a32d3 /lib/std/Build/Step/Run.zig | |
| parent | 7f5bb118d4d90e2b883ee66e17592ac8d7808ac8 (diff) | |
| download | zig-9ccd68de0b79c3723bd11071fd836bc24ff25b33.tar.gz zig-9ccd68de0b79c3723bd11071fd836bc24ff25b33.zip | |
std: move abort and exit from posix into process
and delete the unit tests that called fork()
no forking allowed in the std lib, including unit tests, except to implement child process spawning.
Diffstat (limited to 'lib/std/Build/Step/Run.zig')
| -rw-r--r-- | lib/std/Build/Step/Run.zig | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/std/Build/Step/Run.zig b/lib/std/Build/Step/Run.zig index af6bc20438..54e77bd614 100644 --- a/lib/std/Build/Step/Run.zig +++ b/lib/std/Build/Step/Run.zig @@ -973,7 +973,7 @@ fn make(step: *Step, options: Step.MakeOptions) !void { .output_directory => output_sub_path, else => unreachable, }; - b.cache_root.handle.makePath(output_sub_dir_path) catch |err| { + b.cache_root.handle.makePath(io, output_sub_dir_path) catch |err| { return step.fail("unable to make path '{f}{s}': {s}", .{ b.cache_root, output_sub_dir_path, @errorName(err), }); @@ -1005,7 +1005,7 @@ fn make(step: *Step, options: Step.MakeOptions) !void { .output_directory => output_sub_path, else => unreachable, }; - b.cache_root.handle.makePath(output_sub_dir_path) catch |err| { + b.cache_root.handle.makePath(io, output_sub_dir_path) catch |err| { return step.fail("unable to make path '{f}{s}': {s}", .{ b.cache_root, output_sub_dir_path, @errorName(err), }); @@ -1241,6 +1241,7 @@ fn runCommand( const b = step.owner; const arena = b.allocator; const gpa = options.gpa; + const io = b.graph.io; const cwd: ?[]const u8 = if (run.cwd) |lazy_cwd| lazy_cwd.getPath2(b, step) else null; @@ -1470,7 +1471,7 @@ fn runCommand( const sub_path = b.pathJoin(&output_components); const sub_path_dirname = fs.path.dirname(sub_path).?; - b.cache_root.handle.makePath(sub_path_dirname) catch |err| { + b.cache_root.handle.makePath(io, sub_path_dirname) catch |err| { return step.fail("unable to make path '{f}{s}': {s}", .{ b.cache_root, sub_path_dirname, @errorName(err), }); |
