code: func CaptureOutputToProcess(command string, args ...string) error {
  	cmd := exec.Command(command, args...)
  	out, err := cmd.StdinPipe()
  	if err != nil {
  		return err
  	}
  	defer out.Close()
  	type fder interface {
  		Fd() uintptr
  	}
  	out_fder, ok := out.(fder)
  	if !ok {
  		return fmt.Errorf("unable to get underlying pipe")
  	}
  	err = CaptureOutputToFd(int(out_fder.Fd()))
  	if err != nil {
  		return err
  	}
  	err = cmd.Start()
  	if err != nil {
  		return err
  	}
  	go func() {
  		err := cmd.Wait()
  		if err != nil {
  			panic(fmt.Errorf("captured output process died! %s", err))
  		}
  	}()
  	return nil
  }
docs: // CaptureOutputToProcess starts a process and using CaptureOutputToFd,
  // redirects stdout and stderr to the subprocess' stdin.
  // CaptureOutputToProcess expects the subcommand to last the lifetime of the
  // process, and if the subprocess dies, will panic.