| ... | ... | @@ -390,6 +390,19 @@ pub const ChildProcess = struct { |
| 390 | 390 | setUpChildIo(self.stdout_behavior, stdout_pipe[1], posix.STDOUT_FILENO, dev_null_fd) catch |err| forkChildErrReport(err_pipe[1], err); |
| 391 | 391 | setUpChildIo(self.stderr_behavior, stderr_pipe[1], posix.STDERR_FILENO, dev_null_fd) catch |err| forkChildErrReport(err_pipe[1], err); |
| 392 | 392 | |
| 393 | if (self.stdin_behavior == StdIo.Pipe) { |
| 394 | os.close(stdin_pipe[0]); |
| 395 | os.close(stdin_pipe[1]); |
| 396 | } |
| 397 | if (self.stdout_behavior == StdIo.Pipe) { |
| 398 | os.close(stdout_pipe[0]); |
| 399 | os.close(stdout_pipe[1]); |
| 400 | } |
| 401 | if (self.stderr_behavior == StdIo.Pipe) { |
| 402 | os.close(stderr_pipe[0]); |
| 403 | os.close(stderr_pipe[1]); |
| 404 | } |
| 405 | |
| 393 | 406 | if (self.cwd) |cwd| { |
| 394 | 407 | os.changeCurDir(self.allocator, cwd) catch |err| forkChildErrReport(err_pipe[1], err); |
| 395 | 408 | } |