code: func killAndWait(cmd *exec.Cmd) error {
  	var werr error
  	if runtime.GOOS != "windows" {
  		werrCh := make(chan error)
  		go func() { werrCh <- cmd.Wait() }()
  		cmd.Process.Signal(syscall.SIGTERM)
  		select {
  		case werr = <-werrCh:
  		case <-time.After(3 * time.Second):
  			cmd.Process.Kill()
  			werr = <-werrCh
  		}
  	} else {
  		cmd.Process.Kill()
  		werr = cmd.Wait()
  	}
  	return werr
  }
docs: // killAndWait tries sending SIGTERM to the process before sending SIGKILL.