title: how can I get stdin to exec cmd in golang
body: <p>I have this code</p>
  
  <pre><code>subProcess := exec.Cmd{
      Path: execAble,
      Args: []string{
          fmt.Sprintf("-config=%s", *configPath),
          fmt.Sprintf("-serverType=%s", *serverType),
          fmt.Sprintf("-reload=%t", *reload),
          fmt.Sprintf("-listenFD=%d", fd),
      },
      Dir: here,
  }
  subProcess.Stdout = os.Stdout
  subProcess.Stderr = os.Stderr
  logger.Info("starting  subProcess:%s ", subProcess.Args)
  
  if err := subProcess.Run(); err != nil {
      logger.Fatal(err)
  }
  </code></pre>
  
  <p>and then I do os.Exit(1) to stop the main process</p>
  
  <p>I can get output from the subprocess</p>
  
  <p>but I also want to put stdin to</p>
  
  <p>I try</p>
  
  <pre><code>subProcess.Stdin = os.Stdin
  </code></pre>
  
  <p>but it does not  work</p>