diff options
| author | Timon Kruiper <timonkruiper@gmail.com> | 2020-11-09 21:17:57 +0100 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-12-09 22:16:04 -0500 |
| commit | 4c51adeb0d1dac916dfc117244e14804d3adec8d (patch) | |
| tree | 39a32cceff9011cc78556aef82cbdc295e77ac1e /src | |
| parent | 7c93d9aacb5987c3ada52f7f68c6f38594e08612 (diff) | |
| download | zig-4c51adeb0d1dac916dfc117244e14804d3adec8d.tar.gz zig-4c51adeb0d1dac916dfc117244e14804d3adec8d.zip | |
Do not keep the build.zig cache manifest file locked.
This allows to have multiple instances of `zig build` at the same
time. For example when you have a long running `zig build run` and
then want to run `zig build somethingelse`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.zig | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/main.zig b/src/main.zig index 323c33612a..abb1b61319 100644 --- a/src/main.zig +++ b/src/main.zig @@ -2240,7 +2240,7 @@ pub const usage_build = pub fn cmdBuild(gpa: *Allocator, arena: *Allocator, args: []const []const u8) !void { // We want to release all the locks before executing the child process, so we make a nice // big block here to ensure the cleanup gets run when we extract out our argv. - const lock_and_argv = lock_and_argv: { + const child_argv = argv: { const self_exe_path = try fs.selfExePathAlloc(arena); var build_file: ?[]const u8 = null; @@ -2436,15 +2436,8 @@ pub fn cmdBuild(gpa: *Allocator, arena: *Allocator, args: []const []const u8) !v &[_][]const u8{exe_basename}, ); - break :lock_and_argv .{ - .child_argv = child_argv.items, - .lock = comp.bin_file.toOwnedLock(), - }; + break :argv child_argv.items; }; - const child_argv = lock_and_argv.child_argv; - var lock = lock_and_argv.lock; - defer lock.release(); - const child = try std.ChildProcess.init(child_argv, gpa); defer child.deinit(); |
