aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/env.go
diff options
context:
space:
mode:
Diffstat (limited to 'compiler_wrapper/env.go')
-rw-r--r--compiler_wrapper/env.go18
1 files changed, 0 insertions, 18 deletions
diff --git a/compiler_wrapper/env.go b/compiler_wrapper/env.go
index bbf3ec45..5f5cde38 100644
--- a/compiler_wrapper/env.go
+++ b/compiler_wrapper/env.go
@@ -72,24 +72,6 @@ func (env *processEnv) run(cmd *command, stdin io.Reader, stdout io.Writer, stde
execCmd.Stdin = stdin
execCmd.Stdout = stdout
execCmd.Stderr = stderr
- _, stdinIsFile := stdin.(*os.File)
- _, stdinIsBytesReader := stdin.(*bytes.Reader)
- if stdin != nil && !stdinIsFile && !stdinIsBytesReader {
- // We can't use execCmd.Run() here as that blocks if stdin blocks,
- // even if the underlying process has already terminated. We care
- // especially about the case when stdin is an io.TeeReader for os.Stdin.
- // See https://github.com/golang/go/issues/7990 for more details.
- if err := execCmd.Start(); err != nil {
- return err
- }
- if _, err := execCmd.Process.Wait(); err != nil {
- return err
- }
- // Closing Stdin here as we didn't wait for the read to finish via
- // execCmd.Wait to prevent race conditions.
- os.Stdin.Close()
- return nil
- }
return execCmd.Run()
}