diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-10-31 22:24:02 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-10-31 22:24:02 -0400 |
| commit | 25972be45c360f0242928eeb54f63554a74c7085 (patch) | |
| tree | d27efad2b8afe1eb65586e70065e91e18b549f26 /std | |
| parent | 9e234d4208725b818812765740b474f049d69788 (diff) | |
| download | zig-25972be45c360f0242928eeb54f63554a74c7085.tar.gz zig-25972be45c360f0242928eeb54f63554a74c7085.zip | |
fix windows build from previous commit
Diffstat (limited to 'std')
| -rw-r--r-- | std/os/child_process.zig | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/std/os/child_process.zig b/std/os/child_process.zig index 6e8d49ef57..005d9772e4 100644 --- a/std/os/child_process.zig +++ b/std/os/child_process.zig @@ -219,8 +219,8 @@ pub const ChildProcess = struct { } }); - os.windowsClose(self.handle); - os.windowsClose(self.thread_handle); + os.close(self.handle); + os.close(self.thread_handle); self.cleanupStreams(); return result; } @@ -417,7 +417,7 @@ pub const ChildProcess = struct { } else { undefined }; - defer { if (any_ignore) os.windowsClose(nul_handle); }; + defer { if (any_ignore) os.close(nul_handle); }; if (any_ignore) { %return windowsSetHandleInfo(nul_handle, windows.HANDLE_FLAG_INHERIT, 0); } @@ -556,18 +556,18 @@ pub const ChildProcess = struct { } }; - if (self.stdin_behavior == StdIo.Pipe) { - self.stdin = io.File.openHandle(g_hChildStd_IN_Wr); + if (g_hChildStd_IN_Wr) |h| { + self.stdin = io.File.openHandle(h); } else { self.stdin = null; } - if (self.stdout_behavior == StdIo.Pipe) { - self.stdout = io.File.openHandle(g_hChildStd_OUT_Rd); + if (g_hChildStd_OUT_Rd) |h| { + self.stdout = io.File.openHandle(h); } else { self.stdout = null; } - if (self.stderr_behavior == StdIo.Pipe) { - self.stderr = io.File.openHandle(g_hChildStd_ERR_Rd); + if (g_hChildStd_ERR_Rd) |h| { + self.stderr = io.File.openHandle(h); } else { self.stderr = null; } @@ -576,9 +576,9 @@ pub const ChildProcess = struct { self.thread_handle = piProcInfo.hThread; self.term = null; - if (self.stdin_behavior == StdIo.Pipe) { os.windowsClose(??g_hChildStd_IN_Rd); } - if (self.stderr_behavior == StdIo.Pipe) { os.windowsClose(??g_hChildStd_ERR_Wr); } - if (self.stdout_behavior == StdIo.Pipe) { os.windowsClose(??g_hChildStd_OUT_Wr); } + if (self.stdin_behavior == StdIo.Pipe) { os.close(??g_hChildStd_IN_Rd); } + if (self.stderr_behavior == StdIo.Pipe) { os.close(??g_hChildStd_ERR_Wr); } + if (self.stdout_behavior == StdIo.Pipe) { os.close(??g_hChildStd_OUT_Wr); } } 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) -> } fn windowsDestroyPipe(rd: ?windows.HANDLE, wr: ?windows.HANDLE) { - if (rd) |h| os.windowsClose(h); - if (wr) |h| os.windowsClose(h); + if (rd) |h| os.close(h); + if (wr) |h| os.close(h); } |
