authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-10 21:09:49-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-10 21:09:49-04:00
logbd14a81e301401b5b2a8b849d17d6ae0750272b8
tree5cf072dc80df37095a841a12dab93d941214ecc5
parentd882a305875d5e0ab5d7877c3763b5aaf0ff61ce
signaturelock-open Commit is signed but in an unrecognized format.

fix std.ChildProcess on Windows


1 files changed, 5 insertions(+), 5 deletions(-)

lib/std/child_process.zig+5-5
......@@ -217,13 +217,13 @@ pub const ChildProcess = struct {
217217
218218 try child.spawn();
219219
220 var stdout_file_in_stream = child.stdout.?.inStream();
221 var stderr_file_in_stream = child.stderr.?.inStream();
220 const stdout_in = child.stdout.?.inStream();
221 const stderr_in = child.stderr.?.inStream();
222222
223223 // TODO need to poll to read these streams to prevent a deadlock (or rely on evented I/O).
224 const stdout = try stdout_file_in_stream.readAllAlloc(args.allocator, args.max_output_bytes);
224 const stdout = try stdout_in.readAllAlloc(args.allocator, args.max_output_bytes);
225225 errdefer args.allocator.free(stdout);
226 const stderr = try stderr_file_in_stream.readAllAlloc(args.allocator, args.max_output_bytes);
226 const stderr = try stderr_in.readAllAlloc(args.allocator, args.max_output_bytes);
227227 errdefer args.allocator.free(stderr);
228228
229229 return ExecResult{
......@@ -780,7 +780,7 @@ fn windowsCreateCommandLine(allocator: *mem.Allocator, argv: []const []const u8)
780780 var buf = try Buffer.initSize(allocator, 0);
781781 defer buf.deinit();
782782
783 var buf_stream = &io.BufferOutStream.init(&buf).stream;
783 var buf_stream = buf.outStream();
784784
785785 for (argv) |arg, arg_i| {
786786 if (arg_i != 0) try buf.appendByte(' ');