title: script command execution hung forever in go program
body: <pre><code>func Run() error {
      log.Info("In Run Command")
      cmd := exec.Command("bash", "/opt/AlterKafkaTopic.sh")
      stdout, err := cmd.StdoutPipe()
      if err != nil {
              return err
      }
      if err = cmd.Start(); err != nil {
             return err
      }
      f, err := os.Create(filepath.Join("/opt/log/", "execution.log"))
      if err != nil {
              return err
      }
      if _, err := io.Copy(f, stdout); err != nil {
              return err
      }
           if err := cmd.Wait(); err != nil {
              return err
      }
       return f.Close()
  </code></pre>
  
  <p>}</p>
  
  <p>I am trying to execute a bash script from go code. The script changes some kafka topic properties. But the execution get hung <code>io.Copy(f, stdout)</code> and does not continue after it. 
  This program is running on RHEL7.2 server.</p>
  
  <p>Could someone suggest where I am going wrong</p>