authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-10-31 22:24:02-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-10-31 22:24:02-04:00
log25972be45c360f0242928eeb54f63554a74c7085
treed27efad2b8afe1eb65586e70065e91e18b549f26
parent9e234d4208725b818812765740b474f049d69788

fix windows build from previous commit


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

std/os/child_process.zig+14-14
......@@ -219,8 +219,8 @@ pub const ChildProcess = struct {
219219 }
220220 });
221221
222 os.windowsClose(self.handle);
223 os.windowsClose(self.thread_handle);
222 os.close(self.handle);
223 os.close(self.thread_handle);
224224 self.cleanupStreams();
225225 return result;
226226 }
......@@ -417,7 +417,7 @@ pub const ChildProcess = struct {
417417 } else {
418418 undefined
419419 };
420 defer { if (any_ignore) os.windowsClose(nul_handle); };
420 defer { if (any_ignore) os.close(nul_handle); };
421421 if (any_ignore) {
422422 %return windowsSetHandleInfo(nul_handle, windows.HANDLE_FLAG_INHERIT, 0);
423423 }
......@@ -556,18 +556,18 @@ pub const ChildProcess = struct {
556556 }
557557 };
558558
559 if (self.stdin_behavior == StdIo.Pipe) {
560 self.stdin = io.File.openHandle(g_hChildStd_IN_Wr);
559 if (g_hChildStd_IN_Wr) |h| {
560 self.stdin = io.File.openHandle(h);
561561 } else {
562562 self.stdin = null;
563563 }
564 if (self.stdout_behavior == StdIo.Pipe) {
565 self.stdout = io.File.openHandle(g_hChildStd_OUT_Rd);
564 if (g_hChildStd_OUT_Rd) |h| {
565 self.stdout = io.File.openHandle(h);
566566 } else {
567567 self.stdout = null;
568568 }
569 if (self.stderr_behavior == StdIo.Pipe) {
570 self.stderr = io.File.openHandle(g_hChildStd_ERR_Rd);
569 if (g_hChildStd_ERR_Rd) |h| {
570 self.stderr = io.File.openHandle(h);
571571 } else {
572572 self.stderr = null;
573573 }
......@@ -576,9 +576,9 @@ pub const ChildProcess = struct {
576576 self.thread_handle = piProcInfo.hThread;
577577 self.term = null;
578578
579 if (self.stdin_behavior == StdIo.Pipe) { os.windowsClose(??g_hChildStd_IN_Rd); }
580 if (self.stderr_behavior == StdIo.Pipe) { os.windowsClose(??g_hChildStd_ERR_Wr); }
581 if (self.stdout_behavior == StdIo.Pipe) { os.windowsClose(??g_hChildStd_OUT_Wr); }
579 if (self.stdin_behavior == StdIo.Pipe) { os.close(??g_hChildStd_IN_Rd); }
580 if (self.stderr_behavior == StdIo.Pipe) { os.close(??g_hChildStd_ERR_Wr); }
581 if (self.stdout_behavior == StdIo.Pipe) { os.close(??g_hChildStd_OUT_Wr); }
582582 }
583583
584584 fn setUpChildIo(stdio: StdIo, pipe_fd: i32, std_fileno: i32, dev_null_fd: i32) -> %void {
......@@ -647,8 +647,8 @@ fn windowsCreateCommandLine(allocator: &Allocator, argv: []const []const u8) ->
647647}
648648
649649fn windowsDestroyPipe(rd: ?windows.HANDLE, wr: ?windows.HANDLE) {
650 if (rd) |h| os.windowsClose(h);
651 if (wr) |h| os.windowsClose(h);
650 if (rd) |h| os.close(h);
651 if (wr) |h| os.close(h);
652652}
653653
654654