code: func CaptureOutputToFd(fd int) error {
  	err := syscall.Dup2(fd, syscall.Stdout)
  	if err != nil {
  		return err
  	}
  	err = syscall.Dup2(fd, syscall.Stderr)
  	if err != nil {
  		return err
  	}
  	return nil
  }
docs: // CaptureOutputToFd redirects the current process' stdout and stderr file
  // descriptors to the given file descriptor, using the dup2 syscall.