aboutsummaryrefslogtreecommitdiff
path: root/std/os
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-04-22 11:36:42 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-04-22 11:36:42 -0400
commite0b635e825b72e1308dd0e2bbee578dafe62d9dc (patch)
treeaa9bc22da7198c04a8b3d2cf1dea5280a21bb1cd /std/os
parent0cce115476628ad1bb266309225efa5714d56321 (diff)
downloadzig-e0b635e825b72e1308dd0e2bbee578dafe62d9dc.tar.gz
zig-e0b635e825b72e1308dd0e2bbee578dafe62d9dc.zip
std.os.ChildProcess: fix closing wrong file descriptors
Diffstat (limited to 'std/os')
-rw-r--r--std/os/child_process.zig5
1 files changed, 2 insertions, 3 deletions
diff --git a/std/os/child_process.zig b/std/os/child_process.zig
index 8c09f25bee..bb5b2eb187 100644
--- a/std/os/child_process.zig
+++ b/std/os/child_process.zig
@@ -66,10 +66,9 @@ pub const ChildProcess = struct {
break;
}
- // TODO oops!
test (self.stdin) |*stdin| { stdin.close(); }
- test (self.stdin) |*stdout| { stdout.close(); }
- test (self.stdin) |*stderr| { stderr.close(); }
+ test (self.stdout) |*stdout| { stdout.close(); }
+ test (self.stderr) |*stderr| { stderr.close(); }
// Write @maxValue(ErrInt) to the write end of the err_pipe. This is after
// waitpid, so this write is guaranteed to be after the child