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 {...@@ -219,8 +219,8 @@ pub const ChildProcess = struct {
219 }219 }
220 });220 });
221221
222 os.windowsClose(self.handle);222 os.close(self.handle);
223 os.windowsClose(self.thread_handle);223 os.close(self.thread_handle);
224 self.cleanupStreams();224 self.cleanupStreams();
225 return result;225 return result;
226 }226 }
...@@ -417,7 +417,7 @@ pub const ChildProcess = struct {...@@ -417,7 +417,7 @@ pub const ChildProcess = struct {
417 } else {417 } else {
418 undefined418 undefined
419 };419 };
420 defer { if (any_ignore) os.windowsClose(nul_handle); };420 defer { if (any_ignore) os.close(nul_handle); };
421 if (any_ignore) {421 if (any_ignore) {
422 %return windowsSetHandleInfo(nul_handle, windows.HANDLE_FLAG_INHERIT, 0);422 %return windowsSetHandleInfo(nul_handle, windows.HANDLE_FLAG_INHERIT, 0);
423 }423 }
...@@ -556,18 +556,18 @@ pub const ChildProcess = struct {...@@ -556,18 +556,18 @@ pub const ChildProcess = struct {
556 }556 }
557 };557 };
558558
559 if (self.stdin_behavior == StdIo.Pipe) {559 if (g_hChildStd_IN_Wr) |h| {
560 self.stdin = io.File.openHandle(g_hChildStd_IN_Wr);560 self.stdin = io.File.openHandle(h);
561 } else {561 } else {
562 self.stdin = null;562 self.stdin = null;
563 }563 }
564 if (self.stdout_behavior == StdIo.Pipe) {564 if (g_hChildStd_OUT_Rd) |h| {
565 self.stdout = io.File.openHandle(g_hChildStd_OUT_Rd);565 self.stdout = io.File.openHandle(h);
566 } else {566 } else {
567 self.stdout = null;567 self.stdout = null;
568 }568 }
569 if (self.stderr_behavior == StdIo.Pipe) {569 if (g_hChildStd_ERR_Rd) |h| {
570 self.stderr = io.File.openHandle(g_hChildStd_ERR_Rd);570 self.stderr = io.File.openHandle(h);
571 } else {571 } else {
572 self.stderr = null;572 self.stderr = null;
573 }573 }
...@@ -576,9 +576,9 @@ pub const ChildProcess = struct {...@@ -576,9 +576,9 @@ pub const ChildProcess = struct {
576 self.thread_handle = piProcInfo.hThread;576 self.thread_handle = piProcInfo.hThread;
577 self.term = null;577 self.term = null;
578578
579 if (self.stdin_behavior == StdIo.Pipe) { os.windowsClose(??g_hChildStd_IN_Rd); }579 if (self.stdin_behavior == StdIo.Pipe) { os.close(??g_hChildStd_IN_Rd); }
580 if (self.stderr_behavior == StdIo.Pipe) { os.windowsClose(??g_hChildStd_ERR_Wr); }580 if (self.stderr_behavior == StdIo.Pipe) { os.close(??g_hChildStd_ERR_Wr); }
581 if (self.stdout_behavior == StdIo.Pipe) { os.windowsClose(??g_hChildStd_OUT_Wr); }581 if (self.stdout_behavior == StdIo.Pipe) { os.close(??g_hChildStd_OUT_Wr); }
582 }582 }
583583
584 fn setUpChildIo(stdio: StdIo, pipe_fd: i32, std_fileno: i32, dev_null_fd: i32) -> %void {584 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) ->...@@ -647,8 +647,8 @@ fn windowsCreateCommandLine(allocator: &Allocator, argv: []const []const u8) ->
647}647}
648648
649fn windowsDestroyPipe(rd: ?windows.HANDLE, wr: ?windows.HANDLE) {649fn windowsDestroyPipe(rd: ?windows.HANDLE, wr: ?windows.HANDLE) {
650 if (rd) |h| os.windowsClose(h);650 if (rd) |h| os.close(h);
651 if (wr) |h| os.windowsClose(h);651 if (wr) |h| os.close(h);
652}652}
653653
654654