title: Terminating a Process Started with os/exec in Golang
body: <p>Is there a way to terminate a process started with os.exec in Golang? For example (from <a href="http://golang.org/pkg/os/exec/#example_Cmd_Start">http://golang.org/pkg/os/exec/#example_Cmd_Start</a>), </p>
  
  <pre><code>cmd := exec.Command("sleep", "5")
  err := cmd.Start()
  if err != nil {
      log.Fatal(err)
  }
  log.Printf("Waiting for command to finish...")
  err = cmd.Wait()
  log.Printf("Command finished with error: %v", err)
  </code></pre>
  
  <p>Is there a way to terminate that process ahead of time, perhaps after 3 seconds?</p>
  
  <p>Thanks in advance</p>